home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / ARexxTools / Scion2html.lha / Scion2html.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1996-03-03  |  94.6 KB  |  2,521 lines

  1. /* © Harold H. Ipolyi        11 June 1994, 1995, 1996
  2. =====README=====
  3. Short:    WWW HTML's from Scion Genealogy dbs's
  4. Uploader: ipolyi@pat.mdc.com (Harold H. Ipolyi)
  5. Author:   Harold H. Ipolyi
  6. Type:     util/rexx
  7. LastRev:  3 Mar 1996
  8. _____________________________________________________________________________
  9.  
  10.  to install: just drag Scion2html.rexx & its ICON into REXX:
  11.     however: can be executed from anywhere by double-clicking the ICON
  12. _____________________________________________________________________________
  13. _____________________________________________________________________________
  14.  
  15.  Scion Genealogist © Rob Akins (biz/dbase/Scion.lha) is comprehensive,
  16.  easy to use, and provides Arexx ports for extracting data.
  17. _____________________________________________________________________________
  18.  
  19.  Scion2html.rexx can repeatedly and painlessly recreate HTML files from
  20.  entries in Scion data bases for cross-platform viewing via Mosaic, etc.
  21.  
  22.  Scion2html.rexx can also create AmigaGuide style ".guide" hypertexts
  23. _____________________________________________________________________________
  24.  
  25.  GfxCon © Dirk Farin (gfx/conv/gfxcon.lha) is used to make Thumbnails
  26.  from Scion data base pictures as links to Picture Albums
  27. _____________________________________________________________________________
  28.  
  29.  an interesting example Genealogy is included: see after [Release History]
  30. _____________________________________________________________________________
  31. _____________________________________________________________________________
  32.  
  33. Prerequisites:    Scion V 4.07+ © Rob Akins
  34.         ARexx (of course :)
  35.         rexxsupport.library
  36.         rexxarplib.library
  37.         HTML/WWW browser (AMosaic, Mosaic, ... )
  38.  
  39.      also:     (to incorporate and display in-line pictures)
  40.         GfxCon V1.7+ © Dirk Farin ( must be in: Sys:Tools)
  41.         Amiga OS 3.0+ for displaying picture datatypes
  42. _____________________________________________________________________________
  43.  
  44.  NOTE: The directory suffix for the AmigaGuide files has changed from A to AG
  45.        Internal links prevent simple renaming of [....]A to [....]AG 
  46. _____________________________________________________________________________
  47.  
  48.  NOTE: Info ( ¶ ) files are no longer preset with <pre><tt>
  49.  
  50.        To allow HTML customization of ( ¶ ) info files, i.e. P{IRN}.DBNAME
  51.        and F{IRN}.DBNAME files, Scion2html.rexx will now remove certain HTML
  52.        tags, <tt></tt><pre></pre><p></p>, when writing guide & text files.
  53.  
  54.        These HTML tags should appear on separate lines
  55. _____________________________________________________________________________
  56.  
  57.      PN{IRN}.DBNAME files are used to generate the ( ¶ ) info files.
  58.  
  59.      PICTURES from [P|F]P{IRN}.DBNAME are links to Picture Albums ( ® )
  60.  
  61.                   (please see PP & FP Notes later)
  62. _____________________________________________________________________________
  63.  
  64.                                     Tested:
  65.  
  66. |¯¯¯¯¯¯¯¯¯¯¯¯¯|    on Amiga3000 Kickstart v.37.175 Workbench v.38.35
  67. |    assume   |    &  Amiga3000 Kickstart v.40.68  Workbench v.40.42
  68. |  TradeMarks |    w/ ScionGenealogist V 3.06 & Mosaic1.2NoNet
  69. |      &      |    w/ ScionGenealogist V 3.13 & Mosaic1.3betaAmitcp
  70. |  CopyRights |    w/ ScionGenealogist V 4.07 & Mosaic2.0Prerelease
  71. |     as      |
  72. | appropriate |    HTML file compatibility tested on: AMosaic, Ibrowse_demo,
  73. |_____________|    HotJava, NCSA Mosaic (Sun), Netscape (Sun), Netscape (Mac)
  74.  
  75.                            _________________________
  76.                           |                         |
  77.                           |          Bugs:          |
  78.   ________________________|_________________________|_________________________
  79.  |                                                                            |
  80.  | Scion2html.rexx only recognizes the first Scion ARexx port name: "SCIONGEN"|
  81.  | If additional copies of Scion are running concurrently, they are ignored.  |
  82.  |____________________________________________________________________________|
  83.  |                                                                            |
  84.  |     If a new Thumbnail format is selected, the user must manually edit     |
  85.  |       the Picture Album files to reflect the new Thumbnail suffixes.       |
  86.  |         _________________________________________________________          |
  87.  |        /  The Picture Album files may have been  User  modified  \         |
  88.  |       ( and must therefore be protected against auto-regeneration )        |
  89.  |____________________________________________________________________________|
  90.  
  91. =====README=====
  92.  
  93. =====History=====
  94.  
  95. Release History:
  96.  
  97.  11 Jun 1994 · ScionToMosaic.rexx for ScionGenealogist V 3.06
  98.  
  99.  19 Jun 1994 · MakeDir(HTMLdir) fixed; extra comments processed.
  100.  
  101.  25 Jun 1994 · Fixed descenders; Women in List italicised
  102.              · updated for ScionGenealogist V 3.13
  103.  
  104.   3 Sep 1994 · Replaces occurrences of "<ScionIRN>" by NAMES from DB
  105.              ·   e.g. Replaces <101> by Iam Onehundredone, Jr.
  106.              · Added Family Info file processing; Ancestor trees
  107.              · Added descendant charts
  108.              · Women italicised; men boldface everywhere
  109.              · Added creation of a textual file "GenealogyOf..."
  110.  
  111.   1 Mar 1995 · cleaned up bugs in creation of textual files
  112.  
  113.   6 Jun 1995 · renamed ScionToMosaic to Scion2html
  114.              ·   (somehow it kept winding up in "music" on AmiNet)
  115.              · date format in "ancestors" section normalized
  116.              · images used as links to picture albums (see
  117.              ·  PP & FP Notes) and links to pictures
  118.              · GfxCon >V1.5 used for picture copying and reducing
  119.              · recoded for DOS/Windows restricted 8.3 file names
  120.  
  121.  26 Jun 1995 · A little comments cleanup after the last changes
  122.              · skip remaking of files when unnecessary
  123.              · another new wrinkle for one of the users:
  124.              ·     special file name prefixes ( GenPrefix )
  125.  
  126.   1 Jul 1995 · added graphics to Ancestors charts
  127.              · allow family picture album sans family info file
  128.              · Thumbnail size now user settable ( at line 3 )
  129.  
  130.   5 Jul 1995 · (more info) » ( ¶ )
  131.              · (family info) » ( ¶ )
  132.              · (Picture Album) » ( ® )
  133.              · (¶) (®) glyphs added to Ancestor, Descendant charts
  134.              · Thumbnail format {GIF|JPEG} now user settable
  135.              ·  ( suffix still .gif in all cases )
  136.  
  137.   1 Aug 1995 · updated for release with ScionGenealogist V 4.07
  138.              · set correct stack size (21000) for GfxCon
  139.              · JPEG now the default Thumbnail format
  140.              ·     (smaller files, no © problems, looks better)
  141.              · changing of configuration added
  142.              · configuration now saved in S:Scion2html.Config
  143.  
  144.  12 Aug 1995 · fix some bugs that creeped in with updated to Scion4.07
  145.              · handling of more of the new ScionV4.07 data fields
  146.              · using CheckForReplacement to create all anchors
  147.              · changed appearance of family & descendant charts
  148.              · configuration is displayed at startup
  149.  
  150.  24 Sep 1995 · ".guide" style hypertext generation added
  151.              ·  Guide picture VIEWER set to MultiView for OS => 3.0
  152.              · person information now in person.[array]
  153.              · initial settings now in flags.[array]
  154.              · verbose flag for extra progress reporting details
  155.              · bold flag for: male «boldface» & female «italic»
  156.              · removed undocumented buggy feature of replacing ocurrences
  157.              ·  of [ScionIRN] (now only replaces ocurrences of <ScionIRN>)
  158.              · fixed a GenPrefix init bug (couldn't reset back to null)
  159.  
  160.   1 Jan 1996 · changed "&" in front of MARRIAGE DATES to "x"
  161.              · Scion2html.Config moved from S: to ENVARC:
  162.              · Scion2html.Config now only stored when changed
  163.              · directory of ".guide" style files changed to [.....]AG
  164.              · option - exclude details on living persons
  165.              ·          ( please use ? for death date when date not known )
  166.              · added textured background ( for IBrowse )
  167.              · no longer forcing all ( ¶ ) info files to <pre><tt>
  168.              · added code to filter <tt> </tt> <pre> </pre> <p> </p>
  169.              ·                      HTML tags from guide & text info files.
  170.              · using INDEX for Guide files (instead of "List of People" )
  171.              · "?" then "t" creates "genealogytemplate.html"
  172.              · "?" then "r" view readme information
  173.              · "?" then "h" review the Release History
  174.              · "?" then "d" to change settings of default parameters
  175.  
  176.   3 Mar 1996 · fix null IRN bug
  177.              · 
  178.  
  179. =====History=====
  180.  
  181.  ____________________________________________________________________________
  182.  
  183.  (: "uudecode Scion2html.rexx" <- extracts an interesting Genealogy :)
  184.  (:  hint: compare the names of the GreatGrandParents on both sides :)
  185.  
  186.    ( start a shell                  )
  187.    ( cd work:                       ) some work directory
  188.    ( uudecode Rexx:Scion2html.rexx  ) whatever uudecode equiv you use
  189.    ( run Scion Samms                ) load data base into Scion
  190.    ( rx Scion2html.rexx Normal      ) in shell back on WB screen
  191.  
  192.  « the following can be safely left here »
  193.  
  194. begin 755 Samms
  195. M4V-I;VX`-"XP,```3@``%``)```@0P5%9&ET``56:65W``9!1$%-4P`%0T%)U
  196. M3@`%04U%4P`*JU5.2TY/5TZ[``E/3$U35$5!1``&4T%-35,``0`!``(@``(@(
  197. M``(@``(@``(@```!``$!``D&4T%-35,`!U9I<F=I;``"30`!``$``0`6(D9IF
  198. M<G-T($QE;G-M86X@4V%M;7,B``$`*BAD97-C96YD960@9G)O;2!O;FQY(#0@F
  199. M1W)E871'<F%N9%!A<F5N=',I`#A3;VQA<FEA;B!#;W5N8VEL;&]R('P@4')ES
  200. M<VED96YT(&]F('1H92!'86QA8W1I8R!#;W5N8VEL`#]A;&UO<W0M='=I;B!O/
  201. M9B!T=VEN<R`\-CX@)B`\-SXL(&AI<R`B<75A9')U<&QE('-E8V]N9"!C;W5S]
  202. M:6YS(@``````+D-H+C@@;V8@(D9I<G-T($QE;G-M86XB(&)Y($4N($4N(%-M[
  203. M:71H+"!0:"Y$+@`!``$``0`!``$```(``P$``09304U-4P`02F%M97,@06QEN
  204. M>&%N9&5R``)-``$``0`!``$``0`!``$`&V]N;'D@8VAI;&0@;V8@/#@^(&%N/
  205. M9"`\,30^```````N0V@N."!O9B`B1FER<W0@3&5N<VUA;B(@8GD@12X@12X@R
  206. M4VUI=&@L(%!H+D0N``$``0`!``$``0```P`%`0`!"4],35-414%$``9387)AG
  207. M:``"1@`!``$``0`!``$``0`!`!QO;FQY(&-H:6QD(&]F(#PQ,CX@86YD(#PQ+
  208. M,#X``````"Y#:"XX(&]F(")&:7)S="!,96YS;6%N(B!B>2!%+B!%+B!3;6ET:
  209. M:"P@4&@N1"X``0`!``$``0`!```$``8!``()3TQ-4U1%040`!4IO:&X``DT`C
  210. M`0`!``$``0`!``$``0`<;VYL>2!C:&EL9"!O9B`\,3,^(&%N9"`\,3$^````+
  211. M```N0V@N."!O9B`B1FER<W0@3&5N<VUA;B(@8GD@12X@12X@4VUI=&@L(%!H8
  212. M+D0N``$``0`!``$``0``!0`$`0`"!E-!34U3``9)<F5N90`"1@`!``$``0`!]
  213. M``$``0`!`!MO;FQY(&-H:6QD(&]F(#PY/B!A;F0@/#$U/@``````+D-H+C@@^
  214. M;V8@(D9I<G-T($QE;G-M86XB(&)Y($4N($4N(%-M:71H+"!0:"Y$+@`!``$`;
  215. M`0`!``$```8``@`)3TQ-4U1%040`!T=E;W)G90`"30`!``$``0`!``$``0`!C
  216. M`#94=VEN(&)R;W1H97(@;V8@/#<^.R`B<75A9')U<&QE('-E8V]N9"!C;W5SZ
  217. M:6XB(&]F(#PQ/@``````+D-H+C@@;V8@(D9I<G-T($QE;G-M86XB(&)Y($4N5
  218. M($4N(%-M:71H+"!0:"Y$+@`!``$``0`!``$```<``@`)3TQ-4U1%040`!%)A#
  219. M>0`"30`!``$``0`!``$``0`!`#94=VEN(&)R;W1H97(@;V8@/#8^.R`B<75A&
  220. M9')U<&QE('-E8V]N9"!C;W5S:6XB(&]F(#PQ/@``````+D-H+C@@;V8@(D9I@
  221. M<G-T($QE;G-M86XB(&)Y($4N($4N(%-M:71H+"!0:"Y$+@`!``$``0`!``$`8
  222. M``@`!P$``P9304U-4P`%0FEL;``"30`!``$``0`!``$``0`!`#-4=VEN(&)R!
  223. M;W1H97(@;V8@/#D^+"!S:7-T97)S(#PQ,#X@)B`\,3$^(&%R92!T=VEN<P``M
  224. M````&"AN;R!F:7)S="!N86UE(&EN(&)O;VLI``$``0`!``$``0``"0`'`0`$K
  225. M!E-!34U3``57:6QL``)-``$``0`!``$``0`!``$`,U1W:6X@8G)O=&AE<B!OT
  226. M9B`\.#XL('-I<W1E<G,@/#$P/B`F(#PQ,3X@87)E('1W:6YS```````8*&YO8
  227. M(&9I<G-T(&YA;64@:6X@8F]O:RD``0`!``$``0`!```*``<!``4&4T%-35,`7
  228. M!4=I;&P``D8``0`!``$``0`!``$``0`R5'=I;B!S:7-T97(@;V8@/#$Q/BP@G
  229. M8G)O=&AE<G,@/#@^("8@/#D^(&%R92!T=VEN<P``````&"AN;R!F:7)S="!NT
  230. M86UE(&EN(&)O;VLI``$``0`!``$``0``"P`'`0`&!E-!34U3``5*:6QL``)&;
  231. M``$``0`!``$``0`!``$`,E1W:6X@<VES=&5R(&]F(#PQ,#XL(&)R;W1H97)SZ
  232. M(#PX/B`F(#PY/B!A<F4@='=I;G,``````!@H;F\@9FER<W0@;F%M92!I;B!BW
  233. M;V]K*0`!``$``0`!``$```P`"`$`!0E/3$U35$5!1``%2F%C:P`"30`!``$`"
  234. M`0`!``$``0`!`#14=VEN(&)R;W1H97(@;V8@/#$S/BP@<VES=&5R<R`\,30^\
  235. M("8@/#$U/B!A<F4@='=I;G,``````!@H;F\@9FER<W0@;F%M92!I;B!B;V]K;
  236. M*0`!``$``0`!``$```T`"`$`!@E/3$U35$5!1``%36%C:P`"30`!``$``0`!`
  237. M``$``0`!`#14=VEN(&)R;W1H97(@;V8@/#$R/BP@<VES=&5R<R`\,30^("8@?
  238. M/#$U/B!A<F4@='=I;G,``````!@H;F\@9FER<W0@;F%M92!I;B!B;V]K*0`!?
  239. M``$``0`!``$```X`"`$``PE/3$U35$5!1``$1F%Y``)&``$``0`!``$``0`!R
  240. M``$`-%1W:6X@<VES=&5R(&]F(#PQ-3XL(&)R;W1H97)S(#PQ,CX@)B`\,3,^\
  241. M(&%R92!T=VEN<P``````&"AN;R!F:7)S="!N86UE(&EN(&)O;VLI``$``0`!!
  242. M``$``0``#P`(`0`$"4],35-414%$``1-87D``D8``0`!``$``0`!``$``0`TN
  243. M5'=I;B!S:7-T97(@;V8@/#$T/BP@8G)O=&AE<G,@/#$R/B`F(#PQ,SX@87)E>
  244. M('1W:6YS```````8*&YO(&9I<G-T(&YA;64@:6X@8F]O:RD``0`!``$``0`!K
  245. M```0```!``<&4T%-35,`!T%L8F5R=``"30`!``$``0`!``$``0`!``$`````7
  246. M`"Y#:"XX(&]F(")&:7)S="!,96YS;6%N(B!B>2!%+B!%+B!3;6ET:"P@4&@N&
  247. M1"X``0`!``$``0`!```1```!``@)3TQ-4U1%040`"$-H97-T97(``DT``0`!:
  248. M``$``0`!``$``0`!```````N0V@N."!O9B`B1FER<W0@3&5N<VUA;B(@8GD@O
  249. M12X@12X@4VUI=&@L(%!H+D0N``$``0`!``$``0``$@```0`'!D%$04U3``=!B
  250. M9&5L;&4``D8``0`!``$``0`!``$``0`!```````4*&YO="!N86UE9"!I;B!B!
  251. M;V]K*0`!``$``0`!``$``!,```$`"`5#04E.``A#86UI;&QE``)&``$``0`!]
  252. M``$``0`!``$``0``````%"AN;W0@;F%M960@:6X@8F]O:RD``0`!``$``0`!G
  253. M```4``D`!E-!34U3``E6:7)G:6QI80`"1@`!``$``0`!``$``0`!``$`````T
  254. M``$``0`!``$``0`!```!``(``P$``0$``0`!``$```````$``0`!``$``0``7
  255. M`0```@`$``4"``8`!P$``0`!``$```````$``0`!``$``0```0```P`(``X!_
  256. M``(!``$``0`!```````!``$``0`!``$```$```0`"0`/`0`%`0`!``$``0``R
  257. M`````0`!``$``0`!```!```%``P`"@$``P$``0`!``$```````$``0`!``$`M
  258. M`0```0``!@`-``L!``0!``$``0`!```````!``$``0`!``$```$```<`$``28
  259. M!``(``D`"@`+`0`!``$``0```````0`!``$``0`!```!```(`!$`$P0`#``-]
  260. M``X`#P$``0`!``$```````$``0`!``$``0```0``"0`!```!`!0!``$``0`!*
  261. 2```````!``$``0`!``$```$`&
  262. ``
  263. end
  264. size 2988
  265.  
  266.   -----------------------------------------------------------------
  267.  | Conventions that I followed in my ScionGenealogist data base:   |
  268.  |                                                                 |
  269.  | ·  lastnames kept pure (no honorifics, Jr's, III's )            |
  270.  |                                                                 |
  271.  | ·  given names have any and all honorifics AFTER a COMMA        |
  272.  |                                                                 |
  273.  |  for example:  LastName      FirstNames, honorifics             |
  274.  |                                                                 |
  275.  |                BAUER-GAUSS   Joseph, Dr.                        |
  276.  |                DAGLEY        Richard Kelley, Jr.                |
  277.  |                                                                 |
  278.  |-----------------------------------------------------------------|
  279.  |                                                                 |
  280.  |  For a name change (NOT maidenname > marriedname), try this:    |
  281.  |                New           Birth Name > Changed To, Ph. D.    |
  282.  |     which lists as: Birth Name > Changed To New, Ph. D.         |
  283.  |                                                                 |
  284.   -----------------------------------------------------------------
  285. «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
  286. »«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«
  287. «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
  288. »«                                                                »«
  289. «» GetLastName: PROCEDURE at end of script capitalizes Last Names »«
  290. «» -------------------------------------------------------------  «»
  291. »« | it can also be used to handle "non-conforming" Last Names |  »«
  292. «» |                e.g. "MAC ISAAC" --> "MacISAAC"            |  «»
  293. »« |                     "VON NUEMANN" --> "VonNuemann"        |  »«
  294. «» -------------------------------------------------------------  «»
  295. »« BUT: you must add the additional tests yourself (it's easy!)   »«
  296. «»                                                                «»
  297. «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
  298. »«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«
  299. «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
  300.  |-----------------------------------------------------------------|
  301.  |                                                                 |
  302.  | · if Death Date is blank; Death Place can be a COMMENT field    |
  303.  |                                            e.g. Phone #         |
  304.  | · if Burial Date is blank; Burial Place can be a COMMENT field  |
  305.  |                                            e.g. Address         |
  306.   -----------------------------------------------------------------
  307.  
  308.  * 'rx Scion2html.rexx Normal' automagically [re]creates a .htm file for
  309.  * each person in your ScionGenealogist data base; following the TEMPLATE:
  310.  
  311. ############ genealogytemplate.html ################
  312. <TITLE>Person Data Sheet</TITLE>
  313. <BODY BGCOLOR="#D0D0D0">
  314. <PRE><TT>
  315. <A href="Person#a.html"><img src="Person#I.jpg"></A>
  316. <B>Person</B> (<A HREF="Person#I.html"> ¶ </A>) (<A href="Person#a.html"><B> ® </B></A>) (<A href="Genealogy/GenealogyFile.html"><B>List of Persons.</B></A>)
  317. Born: birthdate * birthplace <BR>
  318. Died: deathdate + deathplace . Buried: burialplace <BR>
  319. <HR>
  320. <H2>List of Persons in data base.</H2><P>
  321. <A HREF="Person#.html"><B>malePerson</B></A> * birthdate + deathdate <A HREF="Father.html"><B>Father</B></A> & <A HREF="Mother.html"><I>Mother</I></A><BR>
  322. <A HREF="Person#.html"><I>femalePerson</I></A> * birthdate + deathdate <A HREF="Father.html"><B>Father</B></A> & <A HREF="Mother.html"><I>Mother</I></A><BR>
  323. <HR>
  324. Immediate Family:  ·Parents  ·Sibling  ·Spouse  ·Child
  325.   <A HREF="Father.html"><B>Father</B></A> & <A HREF="Mother.html"><I>Mother</I></A> x mdate @ mplace
  326.   |            (<A HREF="Family#I.html"> ¶ </A>) (<A href="Family#a.html"><B> ® </B></A>)
  327.   |_____ <A HREF="sibling1.html">sibling1</A> * sibling1birthdate + sibling1deathdate
  328.   |_____ <A HREF="siblingN.html">siblingN</A> * siblingNbirthdate + siblingNdeathdate
  329.   |             
  330.   <b>Person</b> & <A HREF="Spouse1.html"><I>Spouse1</I></A> x m1date @ m1place
  331.   |  |  |            (<A HREF="Family#I.html"> ¶ </A>) (<A href="Family#a.html"><B> ® </B></A>)
  332.   |  |  |_____ <A HREF="m1child1.html"><I>m1child1</I></A> * m1child1birthdate + m1child1birthdate
  333.   |  |  |_____ <A HREF="m1childN.html"><B>m1childN</B></A> * m1childNbirthdate + m1childNbirthdate
  334.   |  |
  335.   |  |_& <A HREF="Spouse2.html"><I>Spouse2</I></A> x m2date @ m2place
  336.   |    |            (<A HREF="Family#I.html"> ¶ </A>) (<A href="Family#a.html"><B> ® </B></A>)
  337.   |    |_____ <A HREF="m2child1.html"><B>m2child1</B></A> * m2child1birthdate + m2child1birthdate
  338.   |    |_____ <A HREF="m2childN.html"><I>m2childN</I></A> * m2childNbirthdate + m2child2birthdate
  339.   |
  340.   |_& <A HREF="SpouseN.html"><I>SpouseN</I></A> x mNdate @ mNplace
  341.     |            (<A HREF="Family#I.html"> ¶ </A>) (<A href="Family#a.html"><B> ® </B></A>)
  342.     |_____ <A HREF="mNchild1.html"><I>mNchild1</I></A> * mNchild1birthdate + mNchild1birthdate
  343.     |_____ <A HREF="mNchildN.html"><I>mNchildN</I></A> * mNchildNbirthdate + mNchildNbirthdate
  344. <HR>
  345. Ancestors
  346.                   ,-<A HREF="GreatGrandFathersFathersFather.html"><B>GreatGrandFathersFathersFather</B></A> (FFFFF) * birthdate
  347.               ,-<A HREF="GreatGrandFathersFather.html"><B>GreatGrandFathersFather</B></A> (FFFF) * birthdate + deathdate
  348.              |    `-<A HREF="GreatGrandFathersFathersMother.html"><I>GreatGrandFathersFathersMother</I></A> (FFFFM) * birthdate
  349.           ,-<A HREF="GreatGrandFather.html"><B>GreatGrandFather</B></A> (FFF) * birthdate + deathdate
  350.          |   |    ,-<A HREF="GreatGrandFathersMothersFather.html"><B>GreatGrandFathersMothersFather</B></A> (FFFMF) * birthdate
  351.          |    `-<A HREF="GreatGrandFathersMother.html"><I>GreatGrandFathersMother</I></A> (FFFM) * birthdate + deathdate
  352.       ,-<A HREF="GrandFather.html"><B>GrandFather</B></A> (FF) * birthdate + deathdate
  353.      |    `-<A HREF="GreatGrandMother.html"><I>GreatGrandMother</I></A> (FFM) * birthdate + deathdate
  354.   ,-<A HREF="Father.html"><B>Father</B></A> (F) * birthdate + deathdate
  355.  |   |    ,-<A HREF="GreatGrandFather.html"><B>GreatGrandFather</B></A> (FMF) * birthdate + deathdate
  356.  |    `-<A HREF="GrandMother.html"><I>GrandMother</I></A> (FM) * birthdate + deathdate
  357.  |        `-<A HREF="GreatGrandMother.html"><I>GreatGrandMother</I></A> (FMM) * birthdate + deathdate
  358. Person * birthdate + deathdate
  359.  |        ,-<A HREF="GreatGrandFather.html"><B>GreatGrandFather</B></A> (MFF) * birthdate + deathdate
  360.  |    ,-<A HREF="GrandFather.html"><B>GrandFather</B></A> (MF) * birthdate + deathdate
  361.  |   |    `-<A HREF="GreatGrandMother.html"><I>GreatGrandMother</I></A> (MFM) * birthdate + deathdate
  362.   `-<A HREF="Mother.html"><I>Mother</I></A> (M) * birthdate + deathdate
  363.      |    ,-<A HREF="GreatGrandFather.html"><B>GreatGrandFather</B></A> (MMF) * birthdate + deathdate
  364.       `-<A HREF="GrandMother.html"><I>GrandMother</I></A> (MM) * birthdate + deathdate
  365.           `-<A HREF="GreatGrandMother.html"><I>GreatGrandMother</I></A> (MMM) * birthdate + deathdate
  366.               `-<A HREF="GreatGrandMothersMother.html"><I>GreatGrandMothersMother</I></A> (MMMM) * birthdate + deathdate
  367.                   `-<A HREF="GreatGrandMothersMothersMother.html"><I>GreatGrandMothersMothersMother</I></A> (MMMMM) * birthdate + deathdate
  368.                       `-<A HREF="GreatGrandMothersMothersMothersMother.html"><I>GreatGrandMothersMothersMothersMother</I></A> (MMMMMM) * birthdate + deathdate
  369.                           `-<A HREF="GreatGrandMothersMothersMothersMothersMother.html"><I>GreatGrandMothersMothersMothersMothersMother</I></A> (MMMMMMM) * birthdate + deathdate
  370. <HR>
  371. Descendants
  372.   <B>Person</B> * birthdate
  373.   &_<A HREF="Spouse1.html"><I>Spouse1</I></A> * birthdate
  374.   :|_<A HREF="m1child1.html"><I><B>m1child1</B></I></A> * m1child1birthdate
  375.   :|_<A HREF="m1child.html"><B><B>m1childN</B></B></A> * m1childNbirthdate
  376.   &_<A HREF="Spouse2.html"><I>Spouse2</I></A> * birthdate
  377.   :|_<A HREF="m2child1.html"><B>m2child1</B></A> * m2child1birthdate
  378.   :|_<A HREF="m2childN.html"><I>m2childN</I></A> * m2childNbirthdate
  379.   :  &_<A HREF="m2childNSpouse1.html"><I>m2childNSpouse1</I></A>
  380.   :   |_<A HREF="m2childNchild1.html"><B>m2childNchild1</B></A>
  381.   &_<A HREF="SpouseN.html"><I>SpouseN</I></A> * birthdate
  382.    |_<A HREF="mNchild1.html"><I>mNchild1</I></A> * mNchild1birthdate
  383.    |_<A HREF="mNchildN.html"><I>mNchildN</I></A> * mNchildNbirthdate
  384. <HR>
  385.      a template to represent Genealogy data in HTML hypertext.
  386.  * replace all ocurrences of each appropriate ITEM with ACTUAL DATA
  387.      e.g. search-replace-all Person with: My Name
  388.      e.g. query-search-replace Mother with: My Mother's Name
  389.  * judiciously edit .html file names in anchors
  390.  * add/remove lines for children, siblings, spouses as necessary
  391. </TT></PRE>
  392. </HTML>
  393. ############ genealogytemplate.html ################
  394.  
  395.  * In an HTML file (maybe HOME PAGE) have an anchor pointing to GenealogyFile:
  396.  
  397.  * ( see the hint at the end of a NORMAL run or specify ANCHOR )
  398. _____________________________________________________________________________
  399.  
  400.  * The PN{IRN}.DBNAME files are used to generate the " ¶ " files.
  401.  
  402.  * Whenever the PN{IRN}.DBNAME is changed or replaced, the corresponding
  403.  * " ¶ " file will be updated if 'rx Scion2html.rexx {IRN}' is re-run.
  404.  
  405.  * PP & FP Notes: (personal & family pictures; picture albums " ® ")
  406.  * ScionGenealogist names pictures as;
  407.  *      PP{IRN}.DBNAME (personal) and FP{mFGRN}.DBNAME (family)
  408.  * {P|F}P{IRN|mFGRN}.DBNAME now used as pictures & links.
  409.  *    GfxCon is used to copy/reduce jpegs from {P|F}P{IRN|mFGRN}.DBNAME
  410.  *    reductions are anchors pointing to HTML's for pictures albums
  411.  *    in pictures albums are anchors pointing to pictures
  412.  *  picture albums will not be overwritten; they may be updated with
  413.  *    additional pictures; links to other pictures, etc.
  414.  
  415.  * Whenever picture {P|F}P{IRN|mFGRN}.DBNAME is changed or replaced,
  416.  *  the corresponding images will be updated
  417.  
  418.  * {P|F}P{IRN|mFGRN}.DBNAME may be any legal GfxCon input picture FORMAT:
  419.  * (ILBM,RGB8,PCX,BMP,RLE8,TIFF,Targa,LBM,RGBN,IMG,RLE4,GIF,JPEG,RGB-Raw)
  420. */
  421.  
  422. stonegif = "47494638376140004000F70000F3F3F3
  423. EEEEEEE9E9E9E3E3E3DCEDEDDDDDDDDCCBCBD8D8D8D2D2D2CBDCDCCCCCCCCBBA
  424. BAC6C6C6C1C1C1BACBCBBBBBBBB6B6B6AABABA52525252525252525252525252
  425. 5252525252525252525252525252525252525252525252525252525252525252
  426. 5252525252525252525252525252525252525252525252525252525252525252
  427. 5252525252525252525252525252525252525252525252525252525252525252
  428. 5252525252525252525252525252525252525252525252525252525252525252
  429. 5252525252525252525252525252525252525252525252525252525252525252
  430. 5252525252525252525252525252525252525252525252525252525252525252
  431. 5252525252525252525252525252525252525252525252525252525252525252
  432. 5252525252525252525252525252525252525252525252525252525252525252
  433. 5252525252525252525252525252525252525252525252525252525252525252
  434. 5252525252525252525252525252525252525252525252525252525252525252
  435. 5252525252525252525252525252525252525252525252525252525252525252
  436. 5252525252525252525252525252525252525252525252525252525252525252
  437. 5252525252525252525252525252525252525252525252525252525252525252
  438. 5252525252525252525252525252525252525252525252525252525252525252
  439. 5252525252525252525252525252525252525252525252525252525252525252
  440. 5252525252525252525252525252525252525252525252525252525252525252
  441. 5252525252525252525252525252525252525252525252525252525252525252
  442. 5252525252525252525252525252525252525252525252525252525252525252
  443. 5252525252525252525252525252525252525252525252525252525252525252
  444. 5252525252525252525252525252525252525252525252525252525252525252
  445. 5252525252525252525252525252525252525252525252525252525252525252
  446. 52525252525252525252525252525252525252525252525252525252522C0000
  447. 0000400040000008FF00152860201041810308183478F0A00183870F050A6480
  448. 40C10383080E14CCC8E080C6040A1C1608595141C285140B1C2C90D0A4C70303
  449. 062800A9D1E548060E122268D04081030507180C78E9D1E04804081204553060
  450. A4C98A1E0B34553950A24189211F10B4EAD166839D070E9AECE85001CBB06111
  451. 0C2028D5694D841A150E7C88546981AD081CAC44DAB162D2033D332235AB31E9
  452. D90881752654C8B3A144C60C12AC35C97260CBA34D4B1254AB37E448AD7E9F22
  453. F5D8712953820306875D58152AD8A13A59AA64709760D096028F56A45DF96BC6
  454. B8BFC3DE44F8C025CEDF093ADEF5E830F941DB0829060D0BB42452B507042470
  455. 8870A743B59433CEFFBCEBA0FBE6AB668186347BD66CC98145254A3DA095BA46
  456. DF0252833799182EDD83090DE5164B3A691414450FDD755D027ED996D07306F5
  457. 2457427009C0526A3521A5125F027D85D050FFE5D65D4C1A1190125000228098
  458. 54B82D05DC4F2D5DF7D260BFAD651060DD79A45476452DA6505F83CD64517E10
  459. 2150DC8D26813491784CF2755086417DD55F61722508128273952495427E21D5
  460. 13505B7924C06E41E5A45A77049265526B0EF584104B5A1126104C4FD2E55F01
  461. 5F0195134C045194540204CA961554522520800004C4A41E80083D3556471656
  462. B55197B4AD7923546385F46594A73DD6D15C031178DB01C9B917DA427E91F693
  463. 824FC2D4957C7E5EFF57D046DD75289D4F8EA607D4504021F4954A2C81949972
  464. 1A6586D56914C1775F7561293967450E2C7060466735F5DD4EE5C9FA185C4511
  465. 58D0410C9A2AC0440D70FB5058326D85A274A9652953A98DF225175C0C3EC453
  466. 5911EDC49697E57A34808707961B9A4E437D57D940007764A7851CF956508F4B
  467. E628D00076C92B138DF6F917EF6E1CD9465153938DE614B5570A36E39AC33AF0
  468. 556A1D31D8148CBC0909D476EC498791475A95BA5969D7A995D4538561376B57
  469. F676E8927A6C65CA51C48309E527C248C215647BDA56745059CFAEB9E6C7ADA5
  470. 955E652DB7F99B5A266ABBE99C9F32D8284B7DBDD493821909ACF07A7BB2BDA1
  471. 421B86C650A5FCA1FF4D9D7B78B13D71AA16951859D7147DB955662B9146D0D9
  472. 6A4A86D450A432F6C0C60D50DCD0553E7B4BD8AF4526C98063579DA8E157DB1D
  473. 2440587D42405B46A9B517D4918D56D7216966252BDFE630797929554C617853
  474. 9FA335E8D2573F3D508085091EE4C0C7818D74974B15C16663710DEC69A472B9
  475. FF97394902957757036C1B3419AF85E1E9E67D176118179834256040D3756E6E
  476. D6BF2391FF407932355715888291114F6E84A78C008066C9329EB22C3393DD28
  477. 88620D10005DD674A0AFF1CA219BC1954DF8941404488B576AA9D77070341DD2
  478. 0CE027262C0E9AAA22957671292A493100698A472BD3D4AE3B180193510043A6
  479. 50350024BF21DF73FFE612279379473AF9A90B936A23A4C0AC4942D88990812E
  480. 8627C254667510C85C8C3664A64F69E84789BB4850002580F5050964FF8AD058
  481. 46F31649C58500E342914A9EA71E1CF66C2CB3E999DC0C43232305E937BD2A0E
  482. 447C539AE985072865DCCCC9CEB297B95451345F49495EC4139D18916F50634A
  483. 511F25752F89FC2432A5C19D607843A072B9C4010620DF6ED2C31C3C31285149
  484. 89930AA717A68EE88724505157AD32651615E64E23DE6210B5660281B12D8659
  485. 2D79C953C45220FD94267B3B7AE00FB5584781C9CA3F6E54CF2177F21EA9294B
  486. 2C1709607C48A63CE5192501F519C0E5A0A4B0B3F84A4358F1081D2D530038FE
  487. 884262C9D0D61CB2FF169938C54FFD7C0B284B93ACF59D2B23C9A14D7608D028
  488. 817DAB41AFEB16531066234532E52E29720995D83200D71DE02722011B4318F2
  489. 9DFBB50658A64CE3E856C3B9BCBCCF6345D90E100350388C2ECF5A035C934A84
  490. B324F554644CA3E34F1C3F331303FC2B5B15F9D2C8AAB3B24C6E653323438004
  491. 0D521C053168A755F91003C6F44783FCC88D47B14D7BD6344B060E2C5450F9E8
  492. 5328C6CD91C0A43CEB9108EBE27AABD8A488223BAA49B2A4C691E718C84F6101
  493. 4D4C02034516F58A5967C989464362A0AC3E559930440001DCF429E324F00010
  494. C851D07AD617A07DE96D84499C785878581DD1C660D4A3E4AE2C929CB8994A89
  495. A2528A6D783537B6FF6CA55CB1A28F6E1C25955CE15327D69C53BB1E34B1A361
  496. C44178292165AA239454AD6E37597CDA86E4A44CCA298C49CBB5AC4ABE949E61
  497. 52AA3C5D81094340DAA3A2C0552B3C41EE43CC94A579868A395CAA0C7A74C214
  498. 9894344F259128774473A30CC568276ACBC8B8D46A35B1E0C4908D5A1C14BF2A
  499. 12DAC23356F5ECD2755ED7960D31D33533A99D60962326D4E50F264C09007DB2
  500. F74CBF48C690C701904269251009F2507EFA0A527227F3CB980C607591D9E1D1
  501. 4AA5000824A929A61A1D46464B9F1999D2282A7C935A26B43F1FEF248B0CC98D
  502. D63CD6DFF77C8CA134AA8AEE72F33681DAC9475F1140001E50CCFBA5C9327C11
  503. 8CA55E5200F9FDC8B3C94AB49D92A813AEA529082101C05366A332BA9D298C36
  504. FA31CA6CC895C0A74897BB280ACDC80063972ABE6A80121451A22F65AF6471E9
  505. 62E279DE68165B176B522B2F06D032601AD2366A7545718F9B93D484832774F9
  506. 4635E80193CDAA223F076451421E0E96BD30181CEA1C04D335C3D170D6659952
  507. 13065DBDBB9F8586D214BDBA298FF1D1F44F6655009581053018140D55144325
  508. 504147C92A890912575257D5AC855B01D8999E7AFD90521984260101003B"X
  509.  
  510. /* Hex file was generated as follows:
  511.    (1) From CLI, typed "type > RAM:temp Stone.gif opt h"
  512.    (2) From a text editor (preferably one with "vertical" block marking),
  513.        removed all the extraneous stuff from resulting "RAM:temp"
  514.    (3) Using text editor, imported the resulting hex file as follows (note
  515.        enclosing quotes and extra "X" at the end).    */
  516.  
  517.             /*   some Intitializations = default        */
  518. flags.Thumbnail = 350    /* Thumbnail maximum dimensions            */
  519. flags.Thmbfmt = "JPEG"    /* Thumbnail format { GIF | JPEG }        */
  520. flags.MakeHTML = 0    /* 0 to make HTML                */
  521. flags.MakeText = 0    /* 1 to make printable ASCII text file        */
  522. flags.MakeGuide = 0    /* 1 to make ".guide" hypertext files        */
  523.  flags.verbose = 0    /* 1 for verbose progress reports        */
  524. flags.bold = 0        /* 0 male «boldface» & female «italic»        */
  525. flags.living = 0        /* > 0 show: Living...                */
  526. flags.GenPrefix = ""    /* needs only be set for specific circumstances 
  527.              ( if this makes no sense, you don't need it :) */
  528.  
  529. sayASCII = ' plain ASCII printable files'
  530. sayguide = ' ".guide" hypertext files'
  531. sayHTML = ' ".htm" hypertext files for WWW Net surfers'
  532. bolditalic = ' using boldface » men and italic » women'
  533. progress = ' progress reports'
  534.  
  535. if EXISTS('rexx:Scion2html.rexx') then rexxdir = "rexx:"
  536. else rexxdir = ""
  537.  
  538. OldScion2html = Open('Scion2html','S:Scion2html.Config','r')
  539.  
  540. if OldScion2html then do
  541.  Close('Scion2html')
  542.  say '... moving S:Scion2html.Config ---> ENVARC:Scion/Scion2html.Config'
  543.  address command 'C:copy S:Scion2html.Config ENVARC:Scion/Scion2html.Config'
  544.  address command 'C:delete S:Scion2html.Config'
  545.  say ' '
  546.  end
  547.  
  548. GoodScion2html = Open('Scion2html','ENVARC:Scion/Scion2html.Config','r')
  549.  
  550. ChangedScion2html = ~GoodScion2html
  551.  
  552. if GoodScion2html then do
  553.  Mdir = readln('Scion2html')
  554.  flags.Thumbnail = readln('Scion2html')
  555.  flags.Thmbfmt = readln('Scion2html')
  556.  coumpound = readln('Scion2html')
  557. /*
  558. say 'coumpound = 'coumpound
  559. do bitnum = 0 to 7 by 1
  560.  say 'bit 'bitnum' = 'bittst(coumpound,bitnum)
  561.  end
  562.           tstbittest = 0
  563. say 'tstbittest = 'tstbittest
  564. do bitnum = 0 to 7 by 1
  565.  say 'bit 'bitnum' = 'bittst(tstbittest,bitnum)
  566.  end
  567.           tstbittest = 7
  568. say 'tstbittest = 'tstbittest
  569. do bitnum = 0 to 7 by 1
  570.  say 'bit 'bitnum' = 'bittst(tstbittest,bitnum)
  571.  end
  572. */
  573.  
  574.  flags.MakeHTML = bittst(coumpound,3)
  575.  flags.MakeGuide = bittst(coumpound,2)
  576. /* flags.verbose */
  577.  flags.bold = bittst(coumpound,1)
  578.  flags.MakeText = bittst(coumpound,0)
  579.  flags.GenPrefix = readln('Scion2html')
  580.  Close('Scion2html')
  581.  
  582.  say '                     '
  583.  say '   Scion2html.Config  settings:'
  584.  say '  output destination: 'Mdir
  585.  end
  586.  
  587. else do
  588.  say '           '
  589.  say '   default  settings:'
  590.  say '  output destination: (will be set later)'
  591.  end
  592.  
  593. say '  Thumbnail: 'flags.Thmbfmt' max 'flags.Thumbnail'x'flags.Thumbnail
  594. if flags.GenPrefix ~= '' then say '  GeneralPrefix = 'flags.GenPrefix
  595.  else say '  GeneralPrefix = {default} [special circumstance only]'
  596. /* in work
  597. if ~flags.MakeHTML then say '  make'sayHTML
  598.  else say ' NOT making'sayHTML
  599. */
  600. if flags.MakeGuide then say '  make'sayguide
  601.  else say ' NOT making'sayguide
  602. if flags.MakeText then say '  make'sayASCII
  603.  else say ' NOT making'sayASCII
  604. if ~flags.bold then say ' 'bolditalic
  605.  else say ' NOT'bolditalic
  606. if flags.verbose then say ' verbose'progress
  607.  else say '  minimal'progress' (during "normal" runs)'
  608. say ' '
  609.  
  610. if flags.GenPrefix = "" then flags.GenPrefix = "GENEAFI"
  611.  
  612. /* add libraries */
  613. libs = 'rexxsupport.library rexxarplib.library'
  614. DO i = 1 TO Words(libs)
  615.  lib = Word(libs,i)
  616.  if ~Show('Lib',lib) then do
  617.   if EXISTS('LIBS:'lib) then call addlib lib, 0, -30
  618.   else do
  619.    'message "ERROR: cannot find' lib 'in LIBS:"'
  620.    AskExit()
  621.    end
  622.   end
  623.  end i
  624.  
  625. say '                                                               '
  626. say ' Note: Scion2html.rexx cannot run while Scion is in HELP mode. '
  627. SAY ' '
  628.  
  629. Address "SCIONGEN"    /* Point at Scion Genealogist port */
  630. options RESULTS
  631.  
  632. if Show(p,'SCIONGEN') then do
  633.  'GETDBNAME'     /* Issue GET DB NAME command to Scion Genealogist */
  634.  DBNAME = RESULT
  635.  'GETTOTALIRN'
  636.  TOTALIRN = RESULT
  637.  if TOTALIRN = 0 then do
  638.  SAY '                                                                  '
  639.  SAY '   Scion Genealogist is currently displaying an EMPTY data base!  '
  640.  SAY '                                                                  '
  641.  SAY ' '
  642.  AskExit()
  643.   end
  644.  end
  645.  
  646. else do
  647.  SAY '                                                               '
  648.  SAY '   Scion Genealogist is NOT currently displaying a data base:  '
  649.  SAY '                                                               '
  650.  SAY ' Please start Scion; load desired data base; then try again... '
  651.  SAY '                                                               '
  652.  SAY ' '
  653.  AskExit()
  654.  end
  655.  
  656. PARSE ARG flags.target
  657. flags.target = Upper(strip(flags.target,,'"')) /* just in case, remove errant quotes */
  658.  
  659. origThumbnail = flags.Thumbnail
  660. origThumbformat = flags.Thmbfmt
  661.  
  662. blanks = '                                                        '
  663.  
  664. flags.DoPictures = CheckGfxCon()
  665.  
  666. DO WHILE flags.target = '' | flags.target = '?' | flags.target = '/' | flags.target = 'H'
  667.  SAY ' '
  668.  if flags.target = '?' | flags.target = '/' | flags.target = 'H' then do
  669.   SAY ' please send comments, questions to: ipolyi@pat.mdc.com'
  670.   SAY '                                    or:'
  671.   SAY '             Scion2html.rexx  ©  Harold H. Ipolyi '
  672.   SAY '                                  P.O.Box 891206 '
  673.   SAY '                                  Houston, Tx 77289-1206'
  674.   SAY '   ____________________________________________________________'
  675.   SAY '  /                                                            \'
  676.   SAY ' / to [re]create HTML hypertext from ScionGenealogist data base \'
  677.   SAY ' \ also, optionally, AmigaGuide style hypertexts or plain ASCII /'
  678.   SAY '  \____________________________________________________________/'
  679.   SAY ' '
  680.  
  681.  
  682.   SAY '                                 '
  683.   SAY ' sub-menu:    »»» pressing RETURN accepts [value]'
  684.   SAY '         '
  685.   SAY ' defaults  change settings of default parameters'
  686.  
  687.   SAY '        '
  688.   SAY '  readme   view Scion2html.rexx readme information'
  689.   SAY '         '
  690.   SAY '  history  review the Release History of Scion2html.rexx'
  691.   if GoodScion2html then do
  692.    SAY '         '
  693.    SAY ' template  Create a Genealogy template 'Mdir'genealogytemplate.html'
  694.    end
  695.   SAY '        '
  696.   SAY '  cancel  '
  697.   SAY ' '
  698.  
  699.   call writech(stdout,' [cancel] ')
  700.   PULL answer
  701.  
  702.   if answer = 'DEFAULTS' | answer = 'D' then do
  703.  
  704.    SAY '                                 '
  705.    SAY ' defaults: may be changed; RETURN accepts [value]'
  706.    svMdir = Mdir
  707.    SAY '                    'substr(blanks,1,length(DBNAME)+3)''
  708.    call writech(stdout,' HTMLs in directory  'DBNAME'G  within ['Mdir'] ')
  709.    PULL Mdir
  710.    if Mdir = '' then Mdir = svMdir
  711.    ChangedScion2html = ChangedScion2html | ( Mdir ~= svMdir )
  712.    SAY ' '
  713.    svGeneralPrefix = flags.GenPrefix
  714.    call writech(stdout,' General Prefix ')
  715.    if flags.GenPrefix ~= 'GENEAFI' then call writech(stdout,'(. to reset) ')
  716.    call writech(stdout,' = [')
  717.    if flags.GenPrefix ~= 'GENEAFI' then call writech(stdout,flags.GenPrefix)
  718.    call writech(stdout,'] ')
  719.    PARSE PULL flags.GenPrefix
  720.    if flags.GenPrefix = '' then flags.GenPrefix = svGeneralPrefix
  721.    else if flags.GenPrefix = '.' then flags.GenPrefix = 'GENEAFI'
  722.    ChangedScion2html = ChangedScion2html | ( flags.GenPrefix ~= svGeneralPrefix )
  723.    SAY ' '
  724. /* in work
  725.    if flags.MakeHTML then writech(stdout,' NOT m')
  726.    else writech(stdout,' M')
  727.    writech(stdout,'aking'sayHTML'; ')
  728.    call writech(stdout,' acceptable? [yes] ')
  729.    PULL answer
  730.    if answer ~= '' then do
  731.     if substr(answer,1,1) = 'N' then do
  732.      flags.MakeHTML = ~flags.MakeHTML
  733.      ChangedScion2html = 1
  734.      end
  735.     end
  736.    SAY ' '
  737. */
  738.    if ~flags.MakeGuide then writech(stdout,' NOT m')
  739.    else writech(stdout,' M')
  740.    writech(stdout,'aking'sayguide'; ')
  741.    call writech(stdout,' acceptable? [yes] ')
  742.    PULL answer
  743.    if answer ~= '' then do
  744.     if substr(answer,1,1) = 'N' then do
  745.      flags.MakeGuide = ~flags.MakeGuide
  746.      ChangedScion2html = 1
  747.      end
  748.     end
  749.    SAY ' '
  750.    if ~flags.MakeText then writech(stdout,' NOT m')
  751.    else writech(stdout,' M')
  752.    writech(stdout,'aking'sayASCII'; ')
  753.    call writech(stdout,' acceptable? [yes] ')
  754.    PULL answer
  755.    if answer ~= '' then do
  756.     if substr(answer,1,1) = 'N' then do
  757.      flags.MakeText = ~flags.MakeText
  758.      ChangedScion2html = 1
  759.      end
  760.     end
  761.    SAY ' '
  762.    if flags.bold then writech(stdout,' NOT')
  763.    writech(stdout,bolditalic'; ')
  764.    call writech(stdout,' acceptable? [yes] ')
  765.    PULL answer
  766.    if answer ~= '' then do
  767.     if substr(answer,1,1) = 'N' then do
  768.      flags.bold = ~flags.bold
  769.      ChangedScion2html = 1
  770.      end
  771.     end
  772.    SAY ' '
  773.    if ~flags.verbose then writech(stdout,' minimal')
  774.    else writech(stdout,' verbose')
  775.    writech(stdout,progress'; ')
  776.    call writech(stdout,' acceptable? [yes] ')
  777.    PULL answer
  778.    if answer ~= '' then do
  779.     if substr(answer,1,1) = 'N' then flags.verbose = ~flags.verbose
  780.     end
  781.    if flags.DoPictures then do
  782.     SAY ' '
  783.     SAY '+-----------------------------------------------------------------+'
  784.     SAY '| NOTE: changing Thumbnail max dim or Thumbnail format will force |'
  785.     SAY '|       regeneration of all Thumbnail pictures. Just so you know! |'
  786.     SAY '+-----------------------------------------------------------------+'
  787.     SAY '|       If Thumbnail format is changed, Picture Albums must then  |'
  788.     SAY '|       be manually edited to reflect the new Thumbnail suffixes. |'
  789.     SAY '+-----------------------------------------------------------------+'
  790.     SAY ' '
  791.     svThumbnail = flags.Thumbnail
  792.     call writech(stdout,' Thumbnail max dim = ['flags.Thumbnail'] ')
  793.     PULL flags.Thumbnail
  794.     if ~IsNumeric(flags.Thumbnail) then flags.Thumbnail = svThumbnail
  795.     ChangedScion2html = ChangedScion2html | ( flags.Thumbnail ~= svThumbnail )
  796.     if flags.Thumbnail < 100 then flags.Thumbnail = 100
  797.     SAY ' '
  798.     svThumbformat = flags.Thmbfmt
  799.     call writech(stdout,' Thumbnail format = ['flags.Thmbfmt'] ')
  800.     PULL flags.Thmbfmt
  801.     if flags.Thmbfmt ~= 'GIF' & flags.Thmbfmt ~= 'JPEG' then flags.Thmbfmt = ''
  802.     if flags.Thmbfmt = '' then flags.Thmbfmt = svThumbformat
  803.     ChangedScion2html = ChangedScion2html | ( flags.Thmbfmt ~= svThumbformat )
  804.     end
  805.    SAY ' '
  806.    end
  807.  
  808.   else if answer = 'TEMPLATE' | answer = 'T' then do
  809.    if Open('genealogytemplate',Mdir'genealogytemplate.html','w') then do
  810. /*
  811.     if ~exists(Mdir'st0ne.gif') then do
  812.      OPEN('giffile',Mdir'st0ne.gif','W')
  813.      WRITECH('giffile', stonegif)
  814.      CLOSE('giffile')
  815.      end
  816. */
  817.     Open('Scion',rexxdir'Scion2html.rexx','r')
  818.     readme = 0
  819.     notbreak = 1
  820.     readmestring = '############ genealogytemplate.html ################'
  821.     DO While ~EOF('Scion') & notbreak
  822.      line = ReadLn('Scion')
  823.      if readme then do
  824.       if line = readmestring then do
  825.        close('genealogytemplate')
  826.        say ' '
  827.        say '                    created: 'Mdir'genealogytemplate.html'
  828.        say ' '
  829.        say ' <a href="/'Mdir'genealogytemplate.html">Genealogy template</a>'
  830.        notbreak = 0
  831.        end
  832.       if notbreak then WriteLn('genealogytemplate',line)
  833.       end
  834.      if line = readmestring then readme = ~readme
  835.      end
  836.      close('Scion')
  837.     end
  838.    end
  839.  
  840.   else if answer = 'HISTORY' | answer = 'H' then do
  841.    if Open('Scion',rexxdir'Scion2html.rexx','r') then do
  842.     readme = 0
  843.     notbreak = 1
  844.     readmestring = '=====History====='
  845.     DO While ~EOF('Scion') & notbreak
  846.      line = ReadLn('Scion')
  847.      if readme then do
  848.       if line = readmestring then notbreak = 0
  849.       if notbreak then say line
  850.       end
  851.      if line = readmestring then readme = ~readme
  852.      end
  853.      close('Scion')
  854.     end
  855.    end
  856.  
  857.   else if answer = 'README' | answer = 'R' then do
  858.    if Open('Scion',rexxdir'Scion2html.rexx','r') then do
  859.     if Open('Scionreadme','RAM:Scion2html.readme','w') then do
  860.      readme = 0
  861.      notbreak = 1
  862.      readmestring = '=====README====='
  863.      DO While ~EOF('Scion') & notbreak
  864.       line = ReadLn('Scion')
  865.       if readme then do
  866.        if line = readmestring then do
  867.         close('Scionreadme')
  868.         say '                      created: RAM:Scion2html.readme'
  869.         notbreak = 0
  870.         end
  871.        if notbreak then do
  872.         WriteLn('Scionreadme',line)
  873.         say line
  874.         end
  875.        end
  876.       if line = readmestring then readme = ~readme
  877.       end
  878.      end
  879.      close('Scion')
  880.     end
  881.    end
  882.  
  883.   end
  884.  
  885.  SAY '                               '
  886.  SAY '   menu:    »»» pressing RETURN accepts [value]'
  887.  SAY '        '
  888.  SAY '   Quit   '
  889.  SAY '       '
  890.  SAY '     ?      about Scion2html.rexx; also can change the settings shown above.'
  891.  SAY '                                              'substr(blanks,1,length(DBNAME)+2)''
  892.  SAY '  Normal    [re]make HTMLs for all persons in  'DBNAME'  data base {'TOTALIRN'}'
  893.  SAY '       '
  894.  SAY '     #      [re]make HTMLs for a specific person: { 1 .. 'TOTALIRN' }'
  895.  SAY '          '
  896.  SAY '  Anchors   hints for: <A href="?">'DBNAME' Genealogy</A>'
  897.  SAY ' '
  898.  
  899.  SAY ' '
  900.  flags.target = 'Normal'
  901.  call writech(stdout,' ['flags.target'] ')
  902.  
  903.  PULL flags.target
  904.  
  905.  if length(flags.target) > 1 & substr(flags.target,1,1) = ' ' then flags.target = substr(flags.target,2,length(flags.target))
  906.  if length(flags.target) > 7 then flags.target = substr(flags.target,1,7)
  907.  if flags.target = '' then flags.target = 'Normal'
  908.  if substr(flags.target,1,1) = '#' then do
  909.   flags.target = ''
  910.   SAY ' '                                    /* :) :) :) :) :) */
  911.   SAY '     NOT #! An actual number, like, you know :), from the set { 1 .. 'TOTALIRN' }'
  912.   end
  913.  if flags.target = 'INFO' | flags.target = 'ABOUT' | flags.target = 'HELP' then flags.target = '?'
  914.  if IsNumeric(flags.target) then do
  915.   if flags.target > TOTALIRN | flags.target < 1 then do
  916.     SAY ' '
  917.     SAY '     Lousy shooting:'
  918.     SAY ' 'flags.target' is outside range of { 1 .. 'TOTALIRN' } of persons in data base  'DBNAME' '
  919.     SAY '     Clean your display, rinse your lenses, and try again!'
  920.     flags.target = ''
  921.    end
  922.   end
  923.  flags.target = Upper(strip(flags.target,,'"'))    /* just in case, remove errant quotes */
  924.  end
  925.  
  926. if ~Validtarget(flags.target) then PauseExit()
  927.  
  928. if substr(flags.target,1,1) = 'A' then flags.target = 'ANCHORS'
  929. if substr(flags.target,1,1) = 'N' then flags.target = 'NORMAL'
  930. if substr(flags.target,1,1) = 'Q' then flags.target = 'QUIT'
  931.  
  932. /* SAY flags.target */
  933.  
  934. 'GETPROGVERSION'
  935. VERSION = RESULT
  936.  
  937. if VERSION < 4.07 then do
  938.  SAY ' '
  939.  say 'ERROR: Requires Scion VERSION = 4.07 (or greater)'
  940.  AskExit()
  941.  end
  942. else do
  943.  if exists("sys:utilities/multiview") then
  944.   flags.VIEWER = "sys:utilities/multiview"    /* Guide picture viewer    */
  945.  else do
  946.   if VERSION < 4.09 then flags.VIEWER = "display"
  947.   else do
  948.    'GETVIEWER'
  949.    flags.VIEWER = RESULT
  950.    end
  951.   end
  952. /* say 'Guide picture viewer = 'flags.VIEWER */
  953.  end
  954.  
  955. /* Get path to database so can locate any note files in same location */
  956. 'GETDBPATH'        /* new in Scion V 4.07 */
  957. DBPATH = RESULT
  958. DBPATH = CheckPathName(DBPATH)
  959.  
  960. /*
  961. SAY ' '
  962. Say ' Testing: is data base assignment of 'DBPATH||DBNAME' visible?'
  963. SAY ' '
  964. */
  965.  
  966. PRAGMA('w','n')
  967. if ~Exists(DBPATH||DBNAME) then do
  968.  SAY 'ERROR: Scion data base 'DBNAME' not found in: 'DBPATH
  969.  AskExit()
  970.  end
  971.  
  972. if ~GoodScion2html then do
  973.  Mdir = ''            /* where to put the directories? */
  974.  if Exists(DBNAME'G') then do    /* check current path */
  975.   Mdir = PRAGMA('d')        /* we're already there */
  976.   end
  977.  else do
  978.   TXTdir = "RAM:"                    /* RAM: if nothing else */
  979.   if Exists('Work:') then TXTdir = "Work:"    /* assume Work: */
  980.   SAY ' '                /* ask, with default prompted */
  981.   if flags.target ~= 'ANCHORS' then call writech(stdout,'Generate ')
  982.   call writech(stdout,'Directory 'DBNAME'G for HTML pages ')
  983.   if flags.target = 'ANCHORS' then call writech(stdout,'is ')
  984.   call writech(stdout,'in: ['TXTdir'] ')
  985.   PULL Mdir
  986.   if Mdir = '' then Mdir = TXTdir        /* default was accepted */
  987.   end
  988.  end
  989.  
  990. Mdir = CheckPathName(Mdir)
  991.  
  992. PRAGMA('w','w')
  993.  
  994. if ~flags.MakeHTML then HTMLdir = Mdir||DBNAME'G'
  995. TXTdir = ''
  996. if flags.MakeText then TXTdir = Mdir||DBNAME'T'
  997. if flags.MakeGuide then AGdir = Mdir||DBNAME'AG'
  998.  
  999. flags.RemakeThumb = ( origThumbnail ~= flags.Thumbnail ) | ( origThumbformat ~= flags.Thmbfmt )
  1000.  
  1001. if ChangedScion2html then do
  1002.  Open('Scion2html','ENVARC:Scion/Scion2html.Config','w')
  1003.  call writeln('Scion2html',Mdir)
  1004.  call writeln('Scion2html',flags.Thumbnail)
  1005.  call writeln('Scion2html',flags.Thmbfmt)
  1006.  coumpound = 0
  1007.  if flags.MakeText then coumpound = bitset(coumpound,0)
  1008.  if flags.bold then coumpound = bitset(coumpound,1)
  1009.  if flags.MakeGuide then coumpound = bitset(coumpound,2)
  1010.  if flags.MakeHTML then coumpound = bitset(coumpound,3)
  1011. /*
  1012. say 'coumpound as written = 'coumpound
  1013. */
  1014.  call writeln('Scion2html',coumpound)
  1015. /*
  1016.  call writeln('Scion2html',flags.MakeText + ( 2 * flags.bold ) + 
  1017. ( 4 * flags.MakeGuide ) + ( 8 * flags.MakeHTML ) )
  1018. */
  1019.  if flags.GenPrefix ~= 'GENEAFI' then call writeln('Scion2html',flags.GenPrefix)
  1020.  Close('Scion2html')
  1021.  end
  1022.  
  1023. if flags.target = 'QUIT' then PauseExit()
  1024.  
  1025. if ~flags.bold then do
  1026.  flags.htmlb = '<B>'
  1027.  flags.htmlub = '</B>'
  1028.  flags.htmli = '<I>'
  1029.  flags.htmlui = '</I>'
  1030.  end
  1031. else do
  1032.  flags.htmlb = ''
  1033.  flags.htmlub = ''
  1034.  flags.htmli = ''
  1035.  flags.htmlui = ''
  1036.  end
  1037.  
  1038. if flags.target ~= "ANCHORS" then do
  1039.  if ~flags.MakeHTML then do
  1040.   if ~Makedir(HTMLdir) then do
  1041.    SAY ' '
  1042.    SAY 'ERROR: unable to create directory: 'HTMLdir
  1043.    AskExit()
  1044.    end
  1045.   if ~exists(HTMLdir'/st0ne.gif') then do
  1046.    OPEN('giffile',HTMLdir'/st0ne.gif','W')
  1047.    WRITECH('giffile', stonegif)
  1048.    CLOSE('giffile')
  1049.    end
  1050.   end
  1051.  
  1052.  if TXTdir ~= '' then do
  1053.   if ~Makedir(TXTdir) then do
  1054.    SAY ' '
  1055.    SAY 'ERROR: unable to create directory: 'TXTdir
  1056.    AskExit()
  1057.    end
  1058.   end
  1059.  
  1060.  if flags.MakeGuide then do
  1061.   if ~Makedir(AGdir) then do
  1062.    SAY ' '
  1063.    SAY 'ERROR: unable to create directory: 'AGdir
  1064.    AskExit()
  1065.    end
  1066.   end
  1067. /*
  1068.  Say "Number of people in database " DBNAME " = " TOTALIRN
  1069.  SAY ' '
  1070. */
  1071.  end
  1072.  
  1073. starttime = Time('e')
  1074.  
  1075. do i = 1 to TOTALIRN
  1076.  person.gotten.i = 0    /* no persons have yet been gotten from "DBNAME" */
  1077.  end
  1078.  
  1079. /* S:Scion2html.Config was here */
  1080.  
  1081. if IsNumeric(flags.target) then do
  1082.  
  1083.  GetPerComp(flags.target) /* GetPerComp gets basic info into person. array */
  1084.  
  1085.  pnumb = flags.target
  1086.  
  1087. /*
  1088.  call writech(stdout,'HTMLs for: 'person.GETFULLNAME.pnumb'? ['yes'] ')
  1089.  PULL answer
  1090.  if answer = '' then answer = 'YES'
  1091.  if substr(answer,1,1) ~= 'Y' then AskExit()
  1092. */
  1093.  call writech(stdout,'         HTMLs')
  1094.  if flags.MakeGuide then
  1095.   call writech(stdout,' & guides')
  1096.  if flags.MakeText then
  1097.   call writech(stdout,' & ASCIItextfile')
  1098.  call writeln(stdout,' for: 'person.GETFULLNAME.pnumb' {'pnumb'}')
  1099.  
  1100.  starttime = Time('e')
  1101.  
  1102.  if flags.target <= TOTALIRN then do
  1103. /*
  1104.   Say 'Processing person ' flags.target ' of ' TOTALIRN ' in database ' DBNAME
  1105. */
  1106.   if TXTdir ~= '' then Open('GenealogyText',TXTdir'/G'flags.target,'w')
  1107.   flags.living = askliving()
  1108.   flags.verbose = 1
  1109.   'EXISTPERSON' flags.target
  1110.   if RESULT = 'YES' then CALL MakeOne(flags.target)
  1111.   else say 'flags.target is a null IRN'
  1112.   if TXTdir ~= '' then Close('GenealogyText')
  1113.   end
  1114.  end
  1115.  
  1116. else do
  1117.  
  1118.  flags.target = Upper(flags.target)
  1119.  
  1120.  if flags.target ~= "ANCHORS" then do
  1121.  
  1122.   flags.target = 'NORMAL'
  1123.   flags.living = askliving()
  1124.   Say ' '
  1125.   call writech(stdout,' HTMLs')
  1126.   if flags.MakeGuide then
  1127.    call writech(stdout,' & guides')
  1128.   if flags.MakeText then
  1129.    call writech(stdout,' & ASCIItextfile')
  1130.   call writeln(stdout,' for all ' TOTALIRN ' persons in database ' DBNAME)
  1131.  
  1132. /* GENEAFIL.htm is a Scion data base IRN order list of all persons in 
  1133.    HTML format: person * birthdate + deathdate (()) father & mother */
  1134.  
  1135.   Say ' '
  1136.   Say 'file name: 'HTMLdir'/'flags.GenPrefix'L.htm for: List of Persons.'
  1137.  
  1138.   Open('GenealogyFile',HTMLdir'/'flags.GenPrefix'L.htm','w')
  1139.   WriteLn('GenealogyFile','<HTML>')
  1140.   WriteLn('GenealogyFile','<TITLE>List of Persons.</TITLE>')
  1141.   WriteLn('GenealogyFile','<BODY BACKGROUND="st0ne.gif">')
  1142.   WriteLn('GenealogyFile','<H2>List of Persons in data base "'DBNAME'". 'flags.htmlb''Time()' - 'Date()''flags.htmlub'</H2>')
  1143.   WriteLn('GenealogyFile','<H3>')
  1144.  
  1145.   if flags.MakeGuide then do
  1146.    Say ' '
  1147.    Say 'file name: 'AGdir'/'flags.GenPrefix'L.guide for: List of Persons.'
  1148.    Open('GenealogyGuide',AGdir'/'flags.GenPrefix'L.guide','w')
  1149.    WriteLn('GenealogyGuide','@database "'flags.GenPrefix'L.guide"')
  1150.    WriteLn('GenealogyGuide','@NODE Main "'DBNAME' Genealogy"')
  1151.    WriteLn('GenealogyGuide',' ')
  1152.    WriteLn('GenealogyGuide','List of Persons in data base "'DBNAME'". @{b}'Time()' - 'Date()'@{ub}')
  1153.    WriteLn('GenealogyGuide',' ')
  1154.    end
  1155.  
  1156.   if flags.MakeText then do
  1157.    Open('GenealogyText',TXTdir'/GenealogyOf'DBNAME,'w')
  1158.    WriteLn('GenealogyText','Genealogy Data Base "'GetLastName(DBNAME)'"')
  1159.    end
  1160.  
  1161.   DO i = 1 TO TOTALIRN
  1162.    'EXISTPERSON' i
  1163.    if RESULT = 'YES' then CALL MakeOne(i)
  1164.    else say 'i is a null IRN'
  1165.    end
  1166.  
  1167.   if flags.MakeGuide then do
  1168.    WriteLn('GenealogyGuide','_______________________________________________')
  1169.    WriteLn('GenealogyGuide','')
  1170.    WriteCh('GenealogyGuide','Definitions: ')
  1171.    if ~flags.bold then
  1172.     WriteCh('GenealogyGuide','@{b}bold=male@{ub}, @{i}italic=fem@{ui},')
  1173.    WriteLn('GenealogyGuide',' * birth, + death, ¶ more info')
  1174.    WriteLn('GenealogyGuide','_______________________________________________')
  1175.    WriteLn('GenealogyGuide','')
  1176.    WriteCh('GenealogyGuide','Credits: ')
  1177.    WriteCh('GenealogyGuide','(@{i}AMIGA@{ui}) · ')
  1178.    WriteCh('GenealogyGuide','(Scion © @{b}Robbie J Akins@{ub}) · ')
  1179.    WriteLn('GenealogyGuide','(Scion2html.rexx © @{b}Harold Ipolyi)')
  1180.    WriteLn('GenealogyGuide','@ENDNODE')
  1181.    Close('GenealogyGuide')
  1182.    end
  1183.  
  1184.   WriteCh('GenealogyFile','</H3>')
  1185.   WriteCh('GenealogyFile','<HR>')
  1186.   WriteLn('GenealogyFile','<Address>')
  1187.   WriteCh('GenealogyFile','Definitions: ')
  1188.   if ~flags.bold then
  1189.    WriteCh('GenealogyFile',flags.htmlb'bold=male'flags.htmlub', 'flags.htmli'italic=fem'flags.htmlui',')
  1190.   WriteLn('GenealogyFile',' * birth, + death, ¶ more info, ® picture album')
  1191.   WriteCh('GenealogyFile','<HR>Credits: ')
  1192.   WriteCh('GenealogyFile','('flags.htmli'<A href="http://www.omnipresence.com/')
  1193.   WriteLn('GenealogyFile','amiga/">AMIGA</A>'flags.htmlui' ® 'flags.htmlb)
  1194.   WriteLn('GenealogyFile','<A href="http://www.amiga.de/">')
  1195.   WriteLn('GenealogyFile','Tech GmbH</A>'flags.htmlub') · ')
  1196.   'GETPROGVERSION'
  1197.   VERSION = RESULT
  1198.   WriteCh('GenealogyFile','(<A href="http://wuarchive.wustl.edu/pub/aminet/')
  1199.   WriteCh('GenealogyFile','info/www/dirs/')
  1200.   WriteCh('GenealogyFile','biz_dbase.html">'flags.htmlb'Scion')
  1201.   if VERSION > 0 then WriteCh('GenealogyFile','V'VERSION)
  1202.   WriteLn('GenealogyFile',''flags.htmlub'</A> © 'flags.htmlb'Robbie J Akins'flags.htmlub') · ')
  1203.   WriteCh('GenealogyFile','(<A href="http://wuarchive.wustl.edu/pub/aminet/')
  1204.   WriteCh('GenealogyFile','info/www/dirs/gfx_co')
  1205.   WriteLn('GenealogyFile','nv.html">'flags.htmlb'GfxCon'flags.htmlub'</A> © 'flags.htmlb'Dirk Farin'flags.htmlub') · ')
  1206.   WriteCh('GenealogyFile','(<A href="http://wuarchive.wustl.edu/pub/aminet/')
  1207.   WriteCh('GenealogyFile','info/www/dirs/')
  1208.   WriteCh('GenealogyFile','util_rexx.html">'flags.htmlb'Scion2html.rexx'flags.htmlub'</A> © ')
  1209. /*
  1210.   WriteCh('GenealogyFile','<A href="http://www.azstarnet.com/~dagley')
  1211.   WriteCh('GenealogyFile','/IPOLYIG/P1.htm">'flags.htmlb'Harold Ipolyi'flags.htmlub'</A>)')
  1212. */
  1213.   WriteLn('GenealogyFile',''flags.htmlb'Harold Ipolyi'flags.htmlub')')
  1214.   WriteCh('GenealogyFile','</Address>')
  1215.   WriteLn('GenealogyFile','</HTML>')
  1216.   end
  1217.  
  1218.  Say ' '
  1219.  Say ' '
  1220.  Say ' If you have not already done so, add the following anchor pointing to'
  1221.  Say ' "'GetLastName(DBNAME)' Genealogy" to a HTML file (maybe HOME PAGE):  '
  1222.  Say ' '
  1223.  Say ' <A href="/'HTMLdir'/'flags.GenPrefix'L.htm">'GetLastName(DBNAME)' Genealogy</A>'
  1224.  Say ' '
  1225.  Say '          and maybe:'
  1226.  Say ' '
  1227.  
  1228.  GetPerComp(1)
  1229.  if flags.GenPrefix = "GENEAFI" then
  1230.   Say ' <A href="/'HTMLdir'/P1.htm">'person.GETFULLNAME.1'</A>'
  1231.  else
  1232.   Say ' <A href="/'HTMLdir'/'flags.GenPrefix'P1.htm">'person.GETFULLNAME.1'</A>'
  1233.  Say ' '
  1234.   end
  1235.  
  1236. /*
  1237.  Open('CreditsFile','ram:Credits.html','w')
  1238. */
  1239.  
  1240.  elapsedtime =  Time('e') - starttime
  1241.  
  1242.  spacer = substr(blanks,1,Length(elapsedtime))
  1243.  
  1244.  Say ' '
  1245.  Say '                                        'spacer'         '
  1246.  Say '  Scion2html.rexx completed normally in 'elapsedtime' seconds '
  1247.  Say '                                        'spacer'         '
  1248.  
  1249.  AskExit()
  1250.  
  1251.  EXIT    /* redundant */
  1252.  
  1253. /*************************************************************************
  1254. *                                                                        *
  1255. *  Makeone procedure extracts data and creates page for a single person  *
  1256. *                                                                        *
  1257. *************************************************************************/
  1258.  
  1259. MakeOne: PROCEDURE EXPOSE person. flags. DBPATH DBNAME AGdir HTMLdir TXTdir
  1260.  PARSE ARG ScionIRN
  1261.  
  1262. 'EXISTPERSON' ScionIRN
  1263. if RESULT = 'YES' then do
  1264.  
  1265.  if flags.GenPrefix = "GENEAFI" then do
  1266.   PersonPrefix = "P"            /* Person file name prefix */
  1267.   FamilyPrefix = "F"            /* Family file name prefix */
  1268.   end
  1269.  else do
  1270.   PersonPrefix = flags.GenPrefix"P"    /* Person file name prefix */
  1271.   FamilyPrefix = flags.GenPrefix"F"    /* Family file name prefix */
  1272.   end
  1273.  
  1274.  if FamilyPrefix = PersonPrefix then do
  1275.   say ' FamilyPrefix MUST NOT EQUAL PersonPrefix'
  1276.   say ' 'FamilyPrefix'                           'PersonPrefix
  1277.   AskExit()
  1278.   EXIT
  1279.   end
  1280.  
  1281.  HasFileFATHER = 0
  1282.  HasFileMOTHER = 0
  1283.  HasMOTHER = 0
  1284.  HasFATHER = 0
  1285.  HasPARENTS = 0
  1286.  HasCHILDREN = 0
  1287.  DoGenText = 0
  1288.  'GETPARENTS' ScionIRN
  1289.  PARENTS = RESULT
  1290.  tPARENTSt = 't'PARENTS't'
  1291. /* Say 'PARENTS = 'PARENTS tPARENTSt    ??? EXISTPARENTS IRN ??? */
  1292.  if tPARENTSt ~= 'tt' then HasPARENTS = 1
  1293.  'GETMARRIAGE' ScionIRN 0    /*      ??? GETTOTMARRIAGES IRN ???     */
  1294.  MARRIAGE = RESULT
  1295.  tMARRIAGESt = 't'MARRIAGE't'
  1296. /*    Say 'MARRIAGES = 'MARRIAGE tMARRIAGESt        */
  1297.  if tMARRIAGESt ~= 'tMARRIAGEt' then do
  1298.   mFGRN = MARRIAGE
  1299.   'GETNUMCHILD' mFGRN
  1300.   if RESULT > 0 then HasCHILDREN = 1
  1301.  end
  1302. /*
  1303. Say 'PARENTS = 'PARENTS tPARENTSt 'MARRIAGES = 'MARRIAGES tMARRIAGESt 'HasPARENTS = 'HasPARENTS 'HasCHILDREN = 'HasCHILDREN
  1304. */
  1305.  if flags.MakeText & ( HasPARENTS + HasCHILDREN ) = 1 then doGenText = 1
  1306.  
  1307.  GetPerComp(ScionIRN)
  1308.  
  1309.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.ScionIRN = "" ) then return 0
  1310.  
  1311.  'GETBAPTISMDATE' ScionIRN
  1312.  BAPTISMDATE = RESULT
  1313.  'GETRELIGION' ScionIRN
  1314.  RELIGION = RESULT
  1315.  'GETBAPTISMPLACE' ScionIRN
  1316.  BAPTISMPLACE = RESULT
  1317.  'GETBURIALPLACE' ScionIRN
  1318.  BURIALPLACE = RESULT
  1319.  'GETDIEDOF' ScionIRN
  1320.  DIEDOF = RESULT
  1321.  'GETEDUCATION' ScionIRN
  1322.  EDUCATION = RESULT
  1323.  'GETOCCUPATION' ScionIRN
  1324.  OCCUPATION = RESULT
  1325.  'GETPERSCOMMENT' ScionIRN
  1326.  PERSCOMMENT = RESULT
  1327.  'GETPERSREFS' ScionIRN
  1328.  PERSREFS = RESULT
  1329. /*
  1330.  ValidInfo = 0
  1331.  if LASTNAME||BIRTHDATE||BIRTHPLACE||DEATHDATE||DEATHPLACE||BURIALPLACE||RELIGION||DIEDOF||EDUCATION||OCCUPATION||PERSCOMMENT||PERSREFS ~= "" THEN ValidInfo = 1
  1332.  if ~ValidInfo then do
  1333. Say "Person " ScionIRN"'s lacking information; no new HTML file being created!"
  1334.   return
  1335.   end
  1336.  if flags.MakeText & ( ValidInfo | LASTNAME ~= "" ) then DoGenText = 1
  1337. */
  1338.  if flags.MakeText then DoGenText = 1
  1339.  PfilN = PersonPrefix || ScionIRN
  1340.  
  1341.  dPfilN = HTMLdir'/'PfilN
  1342.  gPfilN = AGdir'/'PfilN
  1343.  if flags.verbose then do
  1344.   Say ''
  1345.   Say ' HTML:  'dPfilN'.htm  for: 'person.GETFULLNAME.ScionIRN' {'ScionIRN'}'
  1346.   end
  1347.  else Say person.GETFULLNAME.ScionIRN' {'ScionIRN'}'
  1348.  Open('PERSONFILE',dPfilN'.htm','w')
  1349.  WriteLn('PERSONFILE','<HTML>')
  1350.  WriteLn('PERSONFILE','<TITLE>'person.GETFULLNAME.ScionIRN' Data Sheet</TITLE>')
  1351.  WriteLn('PERSONFILE','<BODY BACKGROUND="st0ne.gif">')
  1352.  WriteLn('PERSONFILE','<PRE><TT>')
  1353.  
  1354.  if flags.MakeGuide then do
  1355.   if flags.verbose then 
  1356.    Say 'Guide:  'gPfilN'.guide  for: 'person.GETFULLNAME.ScionIRN' {'ScionIRN'}'
  1357.   Open('PERSONGuide',gPfilN'.guide','w')
  1358.   WriteLn('PERSONGuide','@database "'gPfilN'.guide"')
  1359.   WriteLn('PERSONGuide','@NODE Main "'person.GETFULLNAME.ScionIRN' Genealogy"')
  1360.   WriteLn('PERSONGuide','@INDEX 'AGdir'/'flags.GenPrefix'L.guide/Main')
  1361.   WriteCh('PERSONGuide',person.GETFULLNAME.ScionIRN)
  1362.   end
  1363.  
  1364.  if Exists(DBPATH'PP'ScionIRN'.'DBNAME) & flags.DoPictures then do
  1365.   if flags.RemakeThumb then do
  1366.    DELETE(dPfilN'.GIF')
  1367.    DELETE(dPfilN'.JPEG')
  1368.    end
  1369.  
  1370.   if AgeTest(DBPATH'PP'ScionIRN'.'DBNAME, dPfilN'.jpg') then do
  1371.    Delete(dPfilN'.'flags.Thmbfmt)
  1372.    end
  1373.  
  1374.   WriteCh('PERSONFILE','   <A HREF="'PfilN'A.htm')
  1375.   WriteLn('PERSONFILE','"><img src="'PfilN'.'flags.Thmbfmt'"></A>')
  1376.   end
  1377.  
  1378.  WriteCh('PERSONFILE',person.MGETFULLNAME.ScionIRN)
  1379.  
  1380.  if Exists(DBPATH'PN'ScionIRN'.'DBNAME) then do
  1381.   if flags.verbose then Say 'Writing info ¶ file 'dPfilN'I.htm'
  1382.   Open('PNDBNAME',DBPATH'PN'ScionIRN'.'DBNAME,'r')
  1383.   Open('PERSONI',dPfilN'I.htm','w')
  1384.   if flags.MakeGuide then do
  1385.    if flags.verbose then Say 'Writing info ¶ file 'gPfilN'I.guide'
  1386.    Open('PERSONGI',gPfilN'I.guide','w')
  1387.    WriteLn('PERSONGI','@database "'gPfilN'I.guide"')
  1388.    WriteLn('PERSONGI','@NODE Main "'person.GETFULLNAME.ScionIRN' Information."')
  1389.    WriteLn('PERSONGI','@INDEX 'AGdir'/'flags.GenPrefix'L.guide/Main')
  1390.    end
  1391.   WriteLn('PERSONI','<HTML>')
  1392.   WriteLn('PERSONI','<TITLE>'person.GETFULLNAME.ScionIRN' Information</TITLE>')
  1393.   WriteLn('PERSONI','<BODY BACKGROUND="st0ne.gif">')
  1394.   WriteCh('PERSONI','<H3><A HREF="'PfilN'.htm">'person.MGETFULLNAME.ScionIRN)
  1395.   WriteCh('PERSONI','</A> Information. (<A HREF="'flags.GenPrefix'L.htm">')
  1396.   WriteLn('PERSONI',''flags.htmlb'List of persons.'flags.htmlub'</A>)</H3>')
  1397.   if DoGenText then
  1398.    WriteLn('GenealogyText','<h3>'person.PGETFULLNAME.ScionIRN' Information.</h3>')
  1399.   DO While ~EOF('PNDBNAME')
  1400.    line = ReadLn('PNDBNAME')
  1401.    WriteLn('PERSONI',CheckForReplacement(line))
  1402.    if flags.MakeGuide  | DoGenText then line = TagStrip(line)
  1403.    if flags.MakeGuide then WriteLn('PERSONGI',CheckGuideRepl(line))
  1404.    if DoGenText then WriteLn('GenealogyText',CheckForNAReplacement(line))
  1405.    end
  1406.   Close('PNDBNAME')
  1407.   if DoGenText then WriteLn('GenealogyText',' ')
  1408.   WriteLn('PERSONI','</HTML>')
  1409.   Close('PERSONI')
  1410.   if flags.MakeGuide then do
  1411.    WriteLn('PERSONGI','@ENDNODE')
  1412.    Close('PERSONGI')
  1413.    end
  1414.   WriteCh('PERSONFILE',' (<A HREF="'PfilN'I.htm"> ¶ </A>)')
  1415.   if flags.MakeGuide then
  1416.    WriteCh('PERSONGuide',' @{" More Info (¶) " LINK 'gPfilN'I.guide/Main}')   
  1417.   end
  1418.  
  1419.  if Exists(DBPATH'PP'ScionIRN'.'DBNAME) then do
  1420.   if flags.MakeGuide then do
  1421.    WriteCh('PERSONGuide',' @{" Picture (®) " RXS "address command ')
  1422.    WriteCh('PERSONGuide',"'"flags.VIEWER" ")
  1423.    WriteCh('PERSONGuide',DBPATH'PP'ScionIRN'.'DBNAME"'"'"')
  1424.    WriteCh('PERSONGuide','}')
  1425.    end
  1426.  
  1427.   if flags.DoPictures then do
  1428.    if ~Exists(dPfilN'.jpg') then do
  1429.     Say 'Creating picture 'dPfilN'.jpg'
  1430. /*
  1431. Say 'Sys:Tools/GfxCon 'DBPATH'PP'ScionIRN'.'DBNAME' TO 'dPfilN'.jpg FORMAT JPEG QUALITY 100'
  1432. */
  1433. Say 'Sys:Tools/GfxCon 'DBPATH'PP'ScionIRN'.'DBNAME' TO 'dPfilN'.jpg FORMAT JPEG QUALITY 100'
  1434. OldStackSize = pragma('s',21000)
  1435. address command 'Sys:Tools/GfxCon 'DBPATH'PP'ScionIRN'.'DBNAME' TO 'dPfilN'.jpg FORMAT JPEG QUALITY 100'
  1436. call pragma('s',OldStackSize)
  1437.     end
  1438.    if Exists(dPfilN'.'flags.Thmbfmt) then do
  1439.     if flags.verbose then Say '  ~ image 'dPfilN'.'flags.Thmbfmt'  ...OK... '
  1440.     end
  1441.    else do
  1442.     if flags.verbose then Say 'Creating image 'dPfilN'.'flags.Thmbfmt
  1443. /*
  1444. Say 'Sys:Tools/GfxCon 'DBPATH'PP'ScionIRN'.'DBNAME' TO 'dPfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  1445. */
  1446. Say 'Sys:Tools/GfxCon 'DBPATH'PP'ScionIRN'.'DBNAME' TO 'dPfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  1447. OldStackSize = pragma('s',21000)
  1448. address command 'Sys:Tools/GfxCon 'DBPATH'PP'ScionIRN'.'DBNAME' TO 'dPfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  1449. call pragma('s',OldStackSize)
  1450.     end                   
  1451. WriteCh('PERSONFILE',' (<A HREF="'PfilN'A.htm">'flags.htmlb' ® 'flags.htmlub'</A>)')
  1452.    if Exists(dPfilN'A.htm') then do
  1453.     if flags.verbose then Say '  ~ picture album 'dPfilN'A.htm  ...OK... '
  1454.     end
  1455.    else do
  1456.     Say 'Creating picture album ® 'dPfilN'A.htm'
  1457.     Open('PERSONP',dPfilN'A.htm','w')
  1458.     WriteLn('PERSONP','<HTML>')
  1459.     WriteLn('PERSONP','<TITLE>'person.GETFULLNAME.ScionIRN' Picture Album</TITLE>')
  1460.     WriteLn('PERSONP','<BODY BACKGROUND="st0ne.gif">')
  1461.     WriteCh('PERSONP',person.MGETFULLNAME.ScionIRN' . ')
  1462.     WriteCh('PERSONP','<A HREF="'PfilN'.jpg">')
  1463.     WriteLn('PERSONP','<img src="'PfilN'.'flags.Thmbfmt'"></A>')
  1464.     WriteLn('PERSONP',' . 'flags.htmlb'Picture Album'flags.htmlub'<HR><pre><tt>')
  1465.     WriteCh('PERSONP','<H3>another JPEG picture <A HREF="'PfilN'A1.jpg">')
  1466.     WriteCh('PERSONP','<img src="'PfilN'A1.'flags.Thmbfmt'"></A> anchored by ')
  1467.     WriteLn('PERSONP','thumbnail image created by:')
  1468.     WriteCh('PERSONP','GfxCon 'dPfilN'A1.jpg TO 'dPfilN'A1.'flags.Thmbfmt' FORMAT ')
  1469.     WriteCh('PERSONP',flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail)
  1470.     WriteLn('PERSONP','<HR></pre></tt>')
  1471.     WriteLn('PERSONP',''flags.htmlb'Edit'flags.htmlub' 'dPfilN'A.htm 'flags.htmlb'to add more pictures to the Picture Album<P>')
  1472.     WriteCH('PERSONP','CAUTION: deleting Directory:'flags.htmlub' 'HTMLdir' 'flags.htmlb'destroys all Picture ')
  1473.     WriteLn('PERSONP',' Album modifications. YOUR WORK WILL BE LOST!'flags.htmlub'')
  1474.     WriteLn('PERSONP','</HTML>')
  1475.     Close('PERSONP')
  1476.     end
  1477.    end
  1478.   end
  1479.  
  1480.  WriteLn('PERSONFILE',' (<A HREF="'flags.GenPrefix'L.htm">'flags.htmlb'List of persons.'flags.htmlub'</A>)')
  1481.  
  1482. /*
  1483.  if flags.MakeGuide then do
  1484.   WriteLn('PERSONGuide',' @{" List of People " LINK 'AGdir'/'flags.GenPrefix'L.guide/Main}')
  1485.   end    */
  1486.  
  1487.  if flags.MakeGuide then WriteLn('PERSONGuide','')
  1488.  
  1489.  if DoGenText then do
  1490.   if flags.target ~= "NORMAL" then
  1491.    Say 'ASCII:  'TXTdir'/G'ScionIRN'  for 'person.GETFULLNAME.ScionIRN' {'ScionIRN'}'
  1492.   WriteLn('GenealogyText','')
  1493.   WriteLn('GenealogyText','-----------------------------------------------------------')
  1494.   WriteLn('GenealogyText','')
  1495.   WriteLn('GenealogyText',person.PGETFULLNAME.ScionIRN' Data Sheet')
  1496.   end
  1497.  if person.GETBIRTHDATE.ScionIRN || person.GETBIRTHPLACE.ScionIRN ~= "" then do
  1498.   if person.GETBIRTHDATE.ScionIRN ~= "" then
  1499.    PersOutputCh('Born: 'person.GETBIRTHDATE.ScionIRN' * ',0)
  1500.   if person.GETBIRTHPLACE.ScionIRN ~= "" then
  1501.    PersOutputCh(person.GETBIRTHPLACE.ScionIRN,0)
  1502.   PersOutputCr()
  1503.   end
  1504.  if BAPTISMDATE || BAPTISMPLACE || RELIGION ~= "" then do
  1505.   PersOutputCh('Baptised: ')
  1506.   PersOutputCh(BAPTISMDATE' ')
  1507.   if RELIGION ~= "" then PersOutputCh('{'RELIGION'} ',0)
  1508.   if BAPTISMPLACE ~= "" then PersOutputCh(BAPTISMPLACE,0)
  1509.   PersOutputCr()
  1510.   end
  1511.  if person.GETDEATHDATE.ScionIRN ~= "" & person.GETDEATHDATE.ScionIRN ~= "dead" then do
  1512.   PersOutputCh('Died: 'person.GETDEATHDATE.ScionIRN,0)
  1513.   if person.GETDEATHPLACE.ScionIRN ~= "" then
  1514.    PersOutputCh(' + 'person.GETDEATHPLACE.ScionIRN,0)
  1515.   if BURIALPLACE ~= "" then PersOutputCh(' . Buried: 'BURIALPLACE,0)
  1516.   PersOutputCr()
  1517.   end
  1518.  else do
  1519.   if person.GETDEATHPLACE.ScionIRN ~= "" then
  1520.    PersOutputLn(person.GETDEATHPLACE.ScionIRN,1)
  1521.   if BURIALPLACE ~= "" then PersOutputLn(BURIALPLACE,1)
  1522.   end
  1523.  if DIEDOF ~= "" then PersOutputLn('Cause of Death: 'DIEDOF,1)
  1524.  if EDUCATION ~= "" then PersOutputLn('Education: 'EDUCATION,1)
  1525.  if OCCUPATION ~= "" then PersOutputLn('Occupation: 'OCCUPATION,1)
  1526.  if PERSCOMMENT ~= "" then PersOutputLn('Comments: 'PERSCOMMENT,1)
  1527.  if PERSREFS ~= "" then PersOutputLn('References: 'PERSREFS,1)
  1528.  
  1529. /* end of personal data; start family tree segment */
  1530.  
  1531.  PersOutputHL()
  1532.  HeadLine = ''
  1533.  if HasPARENTS then HeadLine = HeadLine' ·Parents '
  1534.  'GETNUMSIB' ScionIRN
  1535.  xtra = ''
  1536.  if RESULT > 1 then xtra = 's'
  1537.  if RESULT > 0 then HeadLine = HeadLine' ·Sibling'xtra' '
  1538.  'GETNUMMARRY' ScionIRN
  1539.  xtra = ''
  1540.  if RESULT > 1 then xtra = 's'
  1541.  if RESULT > 0 then HeadLine = HeadLine' ·Spouse'xtra' '
  1542.  'GETTOTALCHILD' ScionIRN
  1543.  xtra = 'Child'
  1544.  if RESULT > 1 then xtra = xtra'ren'
  1545.  if RESULT > 0 then HeadLine = HeadLine' ·'xtra
  1546.  PersOutputLn('Immediate Family: 'HeadLine,0)
  1547.  if DoGenText then WriteLn('GenealogyText','')
  1548.  if HasPARENTS then do
  1549.   'GETPRINCIPAL' PARENTS
  1550.   PRINCIPAL = RESULT
  1551.   'GETSPOUSE' PARENTS
  1552.   SPOUSE = RESULT
  1553.   'GETMARRYDATE' PARENTS
  1554.   PARENTSMARRIAGEDATE = RESULT
  1555.   'GETMARRYPLACE' PARENTS
  1556.   PARENTSmFGRNPLACE = RESULT
  1557.   'GETSEX' PRINCIPAL
  1558.   if RESULT = 'M' then do
  1559.    FATHERIRN = PRINCIPAL
  1560.    MOTHERIRN = SPOUSE
  1561.    end
  1562.   else do
  1563.    FATHERIRN = SPOUSE
  1564.    MOTHERIRN = PRINCIPAL
  1565.    end
  1566.   GetPerComp(FATHERIRN)
  1567.   if person.GETFIRSTNAME.FATHERIRN||person.GETLASTNAME.FATHERIRN ~= "" then
  1568.    HasFATHER = 1
  1569.   GetPerComp(MOTHERIRN)
  1570.   if person.GETFIRSTNAME.MOTHERIRN||person.GETLASTNAME.MOTHERIRN ~= "" then
  1571.    HasMOTHER = 1
  1572.  
  1573.   if FATHERLASTNAME ~= "" then do
  1574.    HasFileFATHER = 1
  1575.    FATHERFILENAME = PersonPrefix || FATHERIRN
  1576.    end
  1577.  
  1578.   if MOTHERLASTNAME ~= "" then do
  1579.    HasFileMOTHER = 1
  1580.    MOTHERFILENAME = PersonPrefix || MOTHERIRN
  1581.    end
  1582.  
  1583.   if HasFileFATHER then do
  1584.    PersOutputCh('  <'FATHERIRN'>',1)
  1585. /*
  1586.    if PARENTSMARRIAGEDATE ~= "" then PersOutputCh(' X ',0)
  1587.    else PersOutputCh(' & ',0)
  1588. */
  1589.    PersOutputCh(' & ',0)
  1590.    end
  1591.   PersOutputCh('<'MOTHERIRN'>',1)
  1592.   if ( flags.living = 0 ) then do
  1593.    if ( person.GETDEATHDATE.FATHERIRN||person.GETDEATHDATE.MOTHERIRN = "" ) then do
  1594.  
  1595.     if PARENTSMARRIAGEDATE ~= "" then PersOutputCh(' x 'PARENTSMARRIAGEDATE,0)
  1596.     if PARENTSmFGRNPLACE ~= "" then PersOutputCh(' @ 'PARENTSmFGRNPLACE,0)
  1597.     end
  1598.    end
  1599.   PersOutputCr()
  1600.   spcs = '  |'
  1601.   DO i = 0 TO Length(FATHERFULLNAME) /* ################ */
  1602.    spcs = spcs' '     /* ??? GETFAMLBL1 ??? */
  1603.   end            /* ??? GETFAMLBL2 ??? */
  1604.  
  1605.  Minfo = Exists(DBPATH'FN'PARENTS'.'DBNAME)
  1606.  if PARENTSmFGRNCELEBRANT ~= '' | Minfo then do
  1607.   if DoGenText then WriteLn('GenealogyText','  |')   
  1608.   'GETNUMCHILD' PARENTS
  1609.   TOTCHILDREN = RESULT
  1610. /* say 'TOTCHILDREN = 'TOTCHILDREN */
  1611.   DO i = 0 TO TOTCHILDREN - 1
  1612.    'GETCHILD' PARENTS i
  1613.    PARENTSc = RESULT
  1614.    GetPerComp(PARENTSc)
  1615.    if person.GETFIRSTNAME.PARENTSc ~= "" then do
  1616.     if PARENTSc ~= ScionIRN then do
  1617.      LastNameFl = 1
  1618.      if person.GETLASTNAME.PARENTSc = person.GETLASTNAME.FATHERIRN then do
  1619.       LastNameFl = -1
  1620.       LastNameVal = person.GETLASTNAME.FATHERIRN
  1621.       end
  1622.      PersOutputCh('  |_',0)
  1623.      PersOutputCh('<'PARENTSc'>',LastNameFl)
  1624.      LastNameFl = 1
  1625.      BirthDeath(PARENTSc)
  1626.      PersOutputCr()
  1627.      end
  1628.     end
  1629.    end
  1630.   end
  1631.   PersOutputLn('  |',0)
  1632.  END
  1633.  
  1634. /* end of parents, siblings segment; start marriages segment */
  1635.  
  1636. vert.0 = ''
  1637. vert.1 = '|'
  1638. 'GETNUMMARRY' ScionIRN
  1639. TOTMARRIAGES = RESULT
  1640. /* say 'TOTMARRIAGES = 'TOTMARRIAGES */
  1641. DO i = 0 TO TOTMARRIAGES
  1642.  'GETMARRIAGE' ScionIRN i
  1643.  MARRIAGE = RESULT               /* use: 'EXISTFAMILY'   */
  1644.  if MARRIAGE > -1 then do
  1645.   MARRIAGES = i
  1646.   j = i + 1
  1647.   vert.j = vert.1||vert.i
  1648.   end
  1649.  end
  1650. tMARRIAGESt = 't'MARRIAGES't'
  1651.  PersOutputCh('  |_',0) 
  1652.  if tMARRIAGESt ~= 'tMARRIAGESt' then do
  1653.   DO i = 0 TO MARRIAGES
  1654.    'GETMARRIAGE' ScionIRN i
  1655.    mFGRN = RESULT
  1656.    if mFGRN ~= "" then do
  1657.     ki = MARRIAGES - i + 1
  1658.     if ki ~= MARRIAGES + 1 then PersOutputLn('    'vert.ki,0)
  1659.     j = MARRIAGES + 1 - i
  1660.     'GETSPOUSE' mFGRN
  1661.     SPOUSE = RESULT
  1662.     GetPerComp(SPOUSE)
  1663.     if SPOUSE = ScionIRN then do
  1664.      'GETPRINCIPAL' mFGRN
  1665.      SPOUSE = RESULT
  1666.      end
  1667.     'GETMARRYDATE' mFGRN
  1668.     MARRIAGEDATE = RESULT
  1669.     'GETMARRYPLACE' mFGRN
  1670.     mFGRNPLACE = RESULT
  1671.  
  1672.     SPOUSEFILENAME = PersonPrefix || SPOUSE
  1673.  
  1674.     if i = 0 then do
  1675. /*
  1676.      if MARRIAGEDATE ~= "" then PersOutputCh('<'ScionIRN'> X ',1)
  1677.      else PersOutputCh('<'ScionIRN'> & ',1)
  1678. */
  1679.      PersOutputCh('<'ScionIRN'> & ',1)
  1680.      PersOutputCh('<'SPOUSE'>',1)
  1681.      end
  1682.  
  1683.     else do
  1684. /*
  1685.      if ( MARRIAGEDATE ~= "" ) then PersOutputCh('    'vert.j'_X',0)
  1686.      else PersOutputCh('    'vert.j'_&',0)
  1687. */
  1688.      PersOutputCh('    'vert.j'_&',0)
  1689.      PersOutputCh('<'SPOUSE'>',1)
  1690.      end
  1691.  
  1692.     blockinfo = ( flags.living > 0 ) & ( person.GETDEATHDATE.SPOUSE = "" )
  1693.  
  1694.     if ~blockinfo then do
  1695.  
  1696.      if MARRIAGEDATE ~= "" then PersOutputCh(' x 'MARRIAGEDATE,0)
  1697.      if mFGRNPLACE ~= "" then PersOutputCh(' @ 'mFGRNPLACE,0)
  1698.      PersOutputCr()
  1699.      jk = MARRIAGES - i
  1700.      spcs = '    'vert.jk'    |'
  1701.  
  1702.      FfilN = HTMLdir'/'FamilyPrefix || mFGRN
  1703.      Minfo = 0
  1704.      if Exists(DBPATH'FN'mFGRN'.'DBNAME) then do
  1705.       Minfo = 1
  1706.  
  1707.       if AgeTest(DBPATH'FN'mFGRN'.'DBNAME,FfilN'I.htm') then do
  1708.        Say 'Writing info ¶ file 'FfilN'I.htm'
  1709.        Open('FNDBNAME',DBPATH'FN'mFGRN'.'DBNAME,'r')
  1710.        Open('FAMILYI',FfilN'I.htm','w')
  1711.        WriteLn('FAMILYI','<HTML>')
  1712.        WriteCh('FAMILYI','<TITLE>'person.MGETFULLNAME.ScionIRN' & ')
  1713.        WriteLn('FAMILYI',person.MGETFULLNAME.SPOUSE' Family Information</TITLE>') 
  1714.        WriteLn('FAMILYI','<BODY BACKGROUND="st0ne.gif">')
  1715.  
  1716.        if Exists(DBPATH'FP'mFGRN'.'DBNAME) & flags.DoPictures then do
  1717.         WriteCh('FAMILYI','<A HREF="'FamilyPrefix || mFGRN'A.htm')
  1718.         WriteCh('FAMILYI','"><img src="'FamilyPrefix || mFGRN'.'flags.Thmbfmt'"></A>')
  1719.         end
  1720.  
  1721.        WriteCh('FAMILYI','<H3>Family of 'person.MGETFULLNAME.ScionIRN' & ')
  1722.        
  1723.        if SPOUSE ~= '' then WriteCh('FAMILYI',person.MGETFULLNAME.SPOUSE)
  1724.        else WriteCh('FAMILYI','______')
  1725.  
  1726.        if Exists(DBPATH'FP'mFGRN'.'DBNAME) & flags.DoPictures then do
  1727.         WriteCh('FAMILYI',' (<A HREF="'FamilyPrefix || mFGRN'A.htm')
  1728.         WriteCh('FAMILYI','">'flags.htmlb' ® 'flags.htmlub'</A>) ')
  1729.         end
  1730.  
  1731.        WriteCh('FAMILYI',' (<A HREF="'flags.GenPrefix'L.htm">')
  1732.        WriteLn('FAMILYI',''flags.htmlb'List of persons.'flags.htmlub'</A>)</H2>')
  1733.        DO While ~EOF('FNDBNAME')
  1734.         line = ReadLn('FNDBNAME')
  1735.         WriteLn('FAMILYI',CheckForReplacement(line))
  1736. /*
  1737. if DoGenText then WriteLn('GenealogyText',spcs'  'CheckForNAReplacement(line))
  1738. */
  1739.         end
  1740.        Close('FNDBNAME')
  1741.        WriteLn('FAMILYI','</HTML>')
  1742.        Close('FAMILYI')
  1743.        end
  1744.       end
  1745.  
  1746.      Palbum = 0
  1747.      if Exists(DBPATH'FP'mFGRN'.'DBNAME) & flags.DoPictures then do
  1748.  
  1749.       Palbum = 1
  1750.       if flags.RemakeThumb then do
  1751.        DELETE(FfilN'.GIF')
  1752.        DELETE(FfilN'.JPEG')
  1753.        end
  1754.       if AgeTest(DBPATH'FP'mFGRN'.'DBNAME,FfilN'.jpg') then do
  1755.        Delete(FfilN'.'flags.Thmbfmt)
  1756.        end
  1757.  
  1758.       if flags.DoPictures & ~Exists(FfilN'.jpg') then do
  1759.        Say 'Creating picture 'FfilN'.jpg'
  1760. /*
  1761. Say 'Sys:Tools/GfxCon 'DBPATH'FP'mFGRN'.'DBNAME' TO 'FfilN'.jpg FORMAT JPEG QUALITY 100'
  1762. */
  1763. Say 'Sys:Tools/GfxCon 'DBPATH'FP'mFGRN'.'DBNAME' TO 'FfilN'.jpg FORMAT JPEG QUALITY 100'
  1764. OldStackSize = pragma('s',21000)
  1765. address command 'Sys:Tools/GfxCon 'DBPATH'FP'mFGRN'.'DBNAME' TO 'FfilN'.jpg FORMAT JPEG QUALITY 100'
  1766. call pragma('s',OldStackSize)
  1767.        end
  1768.       if Exists(FfilN'.'flags.Thmbfmt) then do
  1769.        if flags.verbose then Say '  ~ image 'FfilN'.'flags.Thmbfmt'  ...OK... '
  1770.       end
  1771.       else do
  1772.        if flags.verbose then Say 'Creating image 'FfilN'.'flags.Thmbfmt''
  1773. /*
  1774. Say 'Sys:Tools/GfxCon 'DBPATH'FP'mFGRN'.'DBNAME' TO 'FfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  1775. */
  1776. Say 'Sys:Tools/GfxCon 'DBPATH'FP'mFGRN'.'DBNAME' TO 'FfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  1777. OldStackSize = pragma('s',21000)
  1778. address command 'Sys:Tools/GfxCon 'DBPATH'FP'mFGRN'.'DBNAME' TO 'FfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  1779. call pragma('s',OldStackSize)
  1780.        end
  1781.       if Exists(FfilN'A.htm') then do
  1782.        if flags.verbose then Say '  ~ picture album 'FfilN'A.htm  ...OK... '
  1783.        end
  1784.       else do
  1785.        Say 'Creating picture album ® 'FfilN'A.htm'
  1786.        Open('FAMILYP',FfilN'A.htm','w')
  1787. WriteLn('FAMILYP','<HTML>')
  1788. WriteCh('FAMILYP','<TITLE>'person.MGETFULLNAME.ScionIRN' & ')
  1789. WriteCh('FAMILYP',person.MGETFULLNAME.SPOUSE)
  1790. WriteLn('FAMILYP',' Family Picture Album</TITLE>')
  1791. WriteLn('FAMILYP','<BODY BACKGROUND="st0ne.gif">')
  1792. WriteCh('FAMILYP',person.MGETFULLNAME.ScionIRN' & ')
  1793. WriteCh('FAMILYP',person.MGETFULLNAME.SPOUSE)
  1794. WriteCh('FAMILYP',' 'flags.htmlb'Family'flags.htmlub' . ')
  1795. WriteCh('FAMILYP','<A HREF="'FamilyPrefix || mFGRN'.jpg">')
  1796. WriteCh('FAMILYP','<img src="'FamilyPrefix || mFGRN'.'flags.Thmbfmt'"></A>')
  1797. WriteLn('FAMILYP',' . 'flags.htmlb' Picture Album 'flags.htmlub'<HR><pre><tt>')
  1798. WriteCh('FAMILYP','another JPEG picture <A HREF="'FamilyPrefix || mFGRN)
  1799. WriteCh('FAMILYP','A1.jpg"><img src="')
  1800. WriteCh('FAMILYP',FamilyPrefix || mFGRN'A1.'flags.Thmbfmt'"></A> anchored by ')
  1801. WriteLn('FAMILYP','thumbnail image created by:')
  1802. WriteCh('FAMILYP','GfxCon 'FfilN'A1.jpg TO 'FfilN'A1.'flags.Thmbfmt' FORMAT ')
  1803. WriteCh('FAMILYP',flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail)
  1804. WriteLn('FAMILYP','<HR></pre></tt>')
  1805. WriteLn('FAMILYP',''flags.htmlb'Edit'flags.htmlub' 'FfilN'A.htm 'flags.htmlb'to add more pictures to the Picture Album<P>')
  1806. WriteCH('FAMILYP','CAUTION: deleting Directory:'flags.htmlub' 'HTMLdir' 'flags.htmlb'destroys all Picture ')
  1807. WriteLn('FAMILYP',' Album modifications. YOUR WORK WILL BE LOST!'flags.htmlub'')
  1808. WriteLn('FAMILYP','</HTML>')
  1809.        Close('FAMILYP')
  1810.        end
  1811.       end
  1812.  
  1813.      if MARRIAGECELEBRANT ~= '' | Minfo | Palbum then do
  1814.       if Minfo then
  1815.        WriteCh('PERSONFILE',spcs'(<A HREF="'FamilyPrefix || mFGRN'I.htm"> ¶ </A>) ')
  1816.  
  1817.       if Exists(DBPATH'FP'mFGRN'.'DBNAME) & flags.DoPictures then do
  1818.        WriteCh('PERSONFILE',' (<A HREF="'FamilyPrefix || mFGRN'A.htm')
  1819.        WriteCh('PERSONFILE','">'flags.htmlb' ® 'flags.htmlub'</A>) ')
  1820.        end
  1821.  
  1822.       if Exists(DBPATH'FP'mFGRN'.'DBNAME) & flags.MakeGuide then do
  1823.        WriteCh('PERSONGuide',spcs' @{" Picture (®) " RXS "address command ')
  1824.        WriteCh('PERSONGuide',"'"flags.VIEWER" ")
  1825.        WriteCh('PERSONGuide',DBPATH'FP'mFGRN'.'DBNAME"'"'"')
  1826.        WriteLN('PERSONGuide','}')
  1827.        end
  1828.  
  1829.       if ( Exists(DBPATH'FP'mFGRN'.'DBNAME) & flags.DoPictures ) | Minfo then 
  1830.        WriteLn('PERSONFILE',' ')
  1831.  
  1832.       'GETCELEBRANT' mFGRN
  1833.       if RESULT ~= "" then PersOutputLn(spcs' Celebrant: 'RESULT,1)
  1834.       'GETWITNESS' mFGRN
  1835.       if RESULT ~= "" then PersOutputLn(spcs'   Witness: 'RESULT,1)
  1836.       'GETFAMCOMMENT' mFGRN
  1837.       if RESULT ~= "" then PersOutputLn(spcs'  Comments: 'RESULT,1)
  1838.       'GETENDDATE' mFGRN
  1839.       ENDDATE = RESULT
  1840.       'GETENDING' mFGRN
  1841.       ENDING = RESULT
  1842.       if ENDDATE ~= "" | ENDING > 0 then do
  1843.        PersOutputCh(spcs,0)
  1844.        PersOutputCh('     Ended: ',0)
  1845.        if ENDDATE ~= "" then PersOutputCh(ENDDATE,0)
  1846.        if ENDING = 1 then PersOutputCh(' · None',0)
  1847.        if ENDING = 2 then PersOutputCh(' · Divorce',0)
  1848.        if ENDING = 3 then PersOutputCh(' · Separation',0)
  1849.        if ENDING = 4 then PersOutputCh(' · Annulment',0)
  1850.        if ENDING = 5 then PersOutputCh(' · Death',0)
  1851.        PersOutputCr()
  1852.        end
  1853.  
  1854.       'GETFAMREFS' mFGRN
  1855.       if RESULT ~= "" then PersOutputLn(spcs'References: 'RESULT,1)
  1856.  
  1857.       if DoGenText then WriteLn('GenealogyText',spcs)
  1858.  
  1859.       if Minfo & ( DoGenText | flags.MakeGuide ) then do
  1860.        if flags.MakeGuide then WriteLn('PERSONGuide',spcs)
  1861.        Open('FNDBNAME',DBPATH'FN'mFGRN'.'DBNAME,'r')
  1862.        DO While ~EOF('FNDBNAME')
  1863.         line = TagStrip(ReadLn('FNDBNAME'))
  1864.         if flags.MakeGuide then WriteLn('PERSONGuide',spcs'  'CheckGuideRepl(line))
  1865.         if DoGenText then 
  1866.          WriteLn('GenealogyText',spcs'  'CheckForNAReplacement(line))
  1867.         end
  1868.        Close('FNDBNAME')
  1869.        end
  1870.       end
  1871.      end
  1872.     else do
  1873.      PersOutputCr()
  1874.      end
  1875.  
  1876.      'GETNUMCHILD' mFGRN
  1877.      TOTCHILDREN = RESULT
  1878. /* say 'TOTCHILDREN = 'TOTCHILDREN */
  1879.      DO k = 0 TO TOTCHILDREN - 1
  1880.       'GETCHILD' mFGRN k
  1881.       mFGRNc = RESULT
  1882.  
  1883.       GetPerComp(mFGRNc)
  1884.  
  1885.       if person.GETFIRSTNAME.mFGRNc ~= "" then do
  1886.        HasCHILDREN = 1
  1887.  
  1888.        jk = MARRIAGES - i
  1889.        LastNameFl = 1
  1890.        if person.GETLASTNAME.mFGRNc = person.GETLASTNAME.ScionIRN then do
  1891.         LastNameFl = -1
  1892.         LastNameVal = person.GETLASTNAME.ScionIRN
  1893.         end
  1894.        PersOutputCh('    'vert.jk'    |_<'mFGRNc'>',LastNameFl)
  1895.        LastNameFl = 1
  1896.        BirthDeath(mFGRNc)
  1897.        PersOutputCr()
  1898.        end
  1899.       end
  1900.      end
  1901.     end
  1902.   end
  1903.  else do
  1904.   LastNameFl = 1
  1905.   if LASTNAME = FATHERLASTNAME then do
  1906.   LastNameFl = -1
  1907.    LastNameVal = FATHERLASTNAME
  1908.    end
  1909.   PersOutputLn('<'ScionIRN'>',1)
  1910.   LastNameFl = 1
  1911.  end
  1912.  
  1913.  if HasPARENTS then do
  1914.   if flags.verbose then say ' Ancestors...'
  1915.   PersOutputHL()
  1916.   PersOutputLn('Ancestors',0)
  1917.   if DoGenText then WriteLn('GenealogyText','')
  1918.   Paternal(ScionIRN,'  ')
  1919.   PersOutputCh('<'ScionIRN'>',1)
  1920.   if person.GETBIRTHDATE.ScionIRN ~= "" then
  1921.    PersOutputCh(' * 'person.GETBIRTHDATE.ScionIRN,0)
  1922.   if person.GETDEATHDATE.ScionIRN ~= "" & person.GETDEATHDATE.ScionIRN ~= "dead" then
  1923.    if person.GETDEATHDATE.ScionIRN ~= "?" then
  1924.     PersOutputCh(' + 'person.GETDEATHDATE.ScionIRN,0)
  1925.   PersOutputCr()
  1926.   Maternal(ScionIRN,'  ')
  1927.   end
  1928.  
  1929.  if HasCHILDREN then do
  1930.   if flags.verbose then say ' Descendants...'
  1931.   PersOutputHL()
  1932.   indent = "  "
  1933.   PersOutputLn('Descendants',0)
  1934.   if DoGenText then WriteLn('GenealogyText','')
  1935.   PersOutputCh(indent'<'ScionIRN'>',1)
  1936.   if person.GETBIRTHDATE.ScionIRN ~= "" then
  1937.    PersOutputCh(' * 'person.GETBIRTHDATE.ScionIRN,0)
  1938.   if person.GETDEATHDATE.ScionIRN ~= "" & person.GETDEATHDATE.ScionIRN ~= "dead" then
  1939.    if person.GETDEATHDATE.ScionIRN ~= "?" then
  1940.     PersOutputCh(' + 'person.GETDEATHDATE.ScionIRN,0)
  1941.   PersOutputCr()
  1942.   marriagesANDchildren(ScionIRN,indent)
  1943.   end
  1944. /*©*/
  1945.  WriteLn('PERSONFILE','</TT></PRE>')
  1946.  WriteLn('PERSONFILE','</HTML>')
  1947.  Close('PERSONFILE')
  1948.  if flags.MakeGuide then do
  1949.   WriteLn('PERSONGuide','@ENDNODE')
  1950.   Close('PERSONGuide')
  1951.   end
  1952. /*©*/
  1953. /*
  1954.  if flags.target = "NORMAL" & ValidInfo then do
  1955. */
  1956.  if flags.target = "NORMAL" then do
  1957.   if DoGenText then WriteLn('GenealogyText',' ')
  1958.   GeneaOutputCh('<'ScionIRN'>',1)
  1959.   if person.GETBIRTHDATE.ScionIRN ~= "" then
  1960.    GeneaOutputCh('  *'person.GETBIRTHDATE.ScionIRN,0)
  1961.   if person.GETDEATHDATE.ScionIRN ~= "" & person.GETDEATHDATE.ScionIRN ~= "dead" then
  1962.    if person.GETDEATHDATE.ScionIRN ~= "?" then
  1963.     GeneaOutputCh(' +'person.GETDEATHDATE.ScionIRN,0)
  1964.   if HasFATHER then do
  1965.    GeneaOutputCh(' · <'FATHERIRN'>',1)
  1966.    if HasMOTHER then GeneaOutputCh(' & <'MOTHERIRN'>',1)
  1967.    end
  1968.   else do
  1969.    if HasMOTHER then GeneaOutputCh(' · <'MOTHERIRN'>',1)
  1970.    end
  1971.   GeneaOutputCr() /* do not close, we have many more to go. */
  1972.   end
  1973.  return
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979. IsNumeric: PROCEDURE
  1980.  PARSE ARG str
  1981.  return DataType(str, 'W')
  1982.  
  1983.  
  1984. /******************************** Makedir **********************************/
  1985.  
  1986. /* Makedir - If a directory under the given name already exists, or can be
  1987.    created, return 1, otherwise return 0. Though this function works
  1988.    correctly under Workbench 1.3, it has the same effect as the existing
  1989.    MAKEDIR; hence it is useful only under 2.0.
  1990. */
  1991. Makedir: procedure
  1992.  ds = statef(arg(1))
  1993.  if ds='' then
  1994.   result = 'MAKEDIR'(arg(1))
  1995.  else
  1996.   result = left(ds,3) = 'DIR'
  1997.  return result
  1998.  
  1999. Paternal: PROCEDURE EXPOSE person. AGdir flags. DoGenText PersonPrefix DBNAME DBPATH
  2000.  PARSE ARG irn, indent
  2001.  'GETPARENTS' irn
  2002.  PARENTS = RESULT
  2003.  'GETPRINCIPAL' PARENTS
  2004.  PRINCIPAL = RESULT
  2005.  'GETSPOUSE' PARENTS
  2006.  SPOUSE = RESULT
  2007. /* say 'PRINCIPAL = 'PRINCIPAL' SPOUSE = 'SPOUSE */
  2008.  'GETSEX' PRINCIPAL
  2009.  if RESULT = 'M' then do
  2010.   FIRN = PRINCIPAL
  2011.   MIRN = SPOUSE
  2012.   end
  2013.  else do
  2014.   FIRN = SPOUSE
  2015.   MIRN = PRINCIPAL
  2016.   end
  2017.  pirn = FIRN
  2018.  if 't'pirn't' ~= 'tt' then do
  2019.   Paternal(pirn,indent'    ')
  2020.   PersOutputCh(indent' ,-',0)
  2021.   if pirnLASTNAME ~= "" then PersOutputCh('<'pirn'>',1)
  2022.   if EXISTS(DBPATH'PN'pirn'.'DBNAME) then PersOutputCh(' (¶)',0)
  2023.   if EXISTS(DBPATH'PP'pirn'.'DBNAME) then PersOutputCh(' (®)',0)
  2024.   BirthDeath(pirn)
  2025.   PersOutputCr()
  2026.   Maternal(pirn,indent'|   ')
  2027.   end
  2028.  return 0
  2029.  
  2030. Maternal: PROCEDURE EXPOSE person. AGdir flags. DoGenText PersonPrefix DBNAME DBPATH
  2031.  PARSE ARG irn, indent
  2032.  'GETPARENTS' irn
  2033.  PARENTS = RESULT
  2034.  'GETPRINCIPAL' PARENTS
  2035.  PRINCIPAL = RESULT
  2036.  'GETSPOUSE' PARENTS
  2037.  SPOUSE = RESULT
  2038.  'GETSEX' PRINCIPAL
  2039.  if RESULT = 'M' then do
  2040.   FIRN = PRINCIPAL
  2041.   MIRN = SPOUSE
  2042.   end
  2043.  else do
  2044.   FIRN = SPOUSE
  2045.   MIRN = PRINCIPAL
  2046.   end
  2047.  pirn = MIRN
  2048.  if 't'pirn't' ~= 'tt' then do
  2049.   Paternal(pirn,indent'|   ')
  2050.   PersOutputCh(indent' `-',0)
  2051.   if pirnLASTNAME ~= "" then PersOutputCh('<'pirn'>',1)
  2052.   if EXISTS(DBPATH'PN'pirn'.'DBNAME) then PersOutputCh(' (¶)',0)
  2053.   if EXISTS(DBPATH'PP'pirn'.'DBNAME) then PersOutputCh(' (®)',0)
  2054.   BirthDeath(pirn)
  2055.   PersOutputCr()
  2056.   Maternal(pirn,indent'    ')
  2057.   end
  2058.  return 0
  2059.  
  2060. marriagesANDchildren: PROCEDURE EXPOSE person. AGdir flags. DoGenText PersonPrefix DBNAME DBPATH
  2061.         PARSE ARG ScionIRN,indent
  2062.  'GETNUMMARRY' ScionIRN
  2063.  TOTMARRIAGES = RESULT
  2064. /* say 'TOTMARRIAGES = 'TOTMARRIAGES */
  2065.  
  2066.  if 't'TOTMARRIAGES't' = 'tt' then return 0
  2067.  
  2068.  DO i = 0 TO TOTMARRIAGES - 1
  2069.   'GETMARRIAGE' ScionIRN i
  2070.   MARRIAGE = RESULT
  2071.   if MARRIAGE > -1 then do
  2072.    MARRIAGES = i
  2073.    end
  2074.  end
  2075.  tMARRIAGESt = 't'MARRIAGES't'
  2076. /* Say 'MARRIAGES = 'MARRIAGES tMARRIAGESt */
  2077.  
  2078.  if tMARRIAGESt ~= 'tMARRIAGESt' then do
  2079.   DO i = 0 TO MARRIAGES
  2080.    'GETMARRIAGE' ScionIRN i
  2081.    mFGRN = RESULT
  2082.    if mFGRN ~= "" then do
  2083.     'GETSPOUSE' mFGRN
  2084.     SPOUSE = RESULT
  2085.     if SPOUSE = ScionIRN then
  2086.      DO
  2087.      'GETPRINCIPAL' mFGRN
  2088.      SPOUSE = RESULT
  2089.      end
  2090.     PersOutputCh(indent' & ',0)
  2091.     mindent = "  "
  2092.     if i <= ( MARRIAGES - 1 ) then mindent = " :"
  2093.     PersOutputCh('<'SPOUSE'>',1)
  2094. if EXISTS(DBPATH'PN'SPOUSE'.'DBNAME) then PersOutputCh(' (¶)',0)
  2095. if EXISTS(DBPATH'PP'SPOUSE'.'DBNAME) then PersOutputCh(' (®)',0)
  2096.     BirthDeath(SPOUSE)
  2097.     PersOutputCr()
  2098.     'GETNUMCHILD' mFGRN
  2099.     TOTCHILDREN = RESULT
  2100. /* say 'TOTCHILDREN = 'TOTCHILDREN */
  2101.     DO k = 0 TO TOTCHILDREN - 1
  2102.      'GETCHILD' mFGRN k
  2103.      mFGRNc = RESULT
  2104.      GetPerComp(mFGRNc)
  2105.      if k = ( TOTCHILDREN - 1 ) then do
  2106.       indent2 = indent||mindent" "
  2107.       PersOutputCh(indent||mindent'|_<'mFGRNc'>',1)
  2108.       end
  2109.      else do
  2110.       indent2 = indent||mindent"|"
  2111.       PersOutputCh(indent2'_<'mFGRNc'>',1)
  2112.       end
  2113. if EXISTS(DBPATH'PN'mFGRNc'.'DBNAME) then PersOutputCh(' (¶)',0)
  2114. if EXISTS(DBPATH'PP'mFGRNc'.'DBNAME) then PersOutputCh(' (®)',0)
  2115.      BirthDeath(mFGRNc)
  2116.      PersOutputCr()
  2117.  
  2118.      marriagesANDchildren(mFGRNc,indent2)
  2119.      end
  2120.     end
  2121.    end
  2122.   end
  2123.  return 0
  2124.  
  2125. PersOutputHL: PROCEDURE EXPOSE person. DoGenText flags.
  2126.  WriteLn('PERSONFILE','<HR>')
  2127.  if flags.MakeGuide then WriteLn('PERSONGuide','')
  2128.  if DoGenText then do
  2129.    WriteLn('GenealogyText','')
  2130.    WriteLn('GenealogyText','-----------------------------------------------------------')
  2131.    WriteLn('GenealogyText','')
  2132.    end
  2133.  return 0
  2134.  
  2135. BirthDeath: PROCEDURE EXPOSE person. DoGenText flags.
  2136.  irn = arg(1)
  2137.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.irn = "" ) then return 0
  2138. /* GetPerComp(irn) */
  2139.  if person.gotten.irn = PERSON.GOTTEN. then return 0
  2140.  if person.GETBIRTHDATE.irn ~= "" then
  2141.   PersOutputCh('   * 'person.GETBIRTHDATE.irn,0)
  2142.  if person.GETDEATHDATE.irn ~= "" & person.GETDEATHDATE.irn ~= "?" then
  2143.   PersOutputCh('   + 'person.GETDEATHDATE.irn,0)
  2144.  return 0
  2145.  
  2146. PersOutputCr: PROCEDURE EXPOSE person. DoGenText flags.
  2147.  WriteLn('PERSONFILE','')
  2148.  if flags.MakeGuide then WriteLn('PERSONGuide','')
  2149.  if DoGenText then WriteLn('GenealogyText','')
  2150.  return 0
  2151.  
  2152. PersOutputCh: PROCEDURE EXPOSE person. AGdir DoGenText flags. PersonPrefix LastNameFl LastNameVal
  2153.  if arg(1) ~= "" then do
  2154.   if arg(2) = 0 then do
  2155.    WriteCh('PERSONFILE',arg(1))
  2156.    if flags.MakeGuide then do
  2157.     if arg(1) = ' ('flags.htmlb'®'flags.htmlub')' then WriteCh('PERSONGuide',' (®)')
  2158.     else WriteCh('PERSONGuide',arg(1))
  2159.     end
  2160.    if DoGenText then WriteCh('GenealogyText',arg(1))
  2161.    end
  2162.   else do
  2163.    WriteCh('PERSONFILE',CheckForReplacement(arg(1)))
  2164.    if flags.MakeGuide then WriteCh('PERSONGuide',CheckGuideRepl(arg(1)))
  2165.    if DoGenText then WriteCh('GenealogyText',CheckForNAReplacement(arg(1)))
  2166.    end
  2167.  end
  2168.  return 0
  2169.  
  2170. PersOutputLn: PROCEDURE EXPOSE person. AGdir DoGenText flags. PersonPrefix LastNameFl LastNameVal
  2171.  if arg(1) ~= "" then do
  2172.   if arg(2) = 0 then do
  2173.    WriteLn('PERSONFILE',arg(1))
  2174.    if flags.MakeGuide then WriteLn('PERSONGuide',arg(1))
  2175.    if DoGenText then WriteLn('GenealogyText',arg(1))
  2176.    end
  2177.   else do
  2178.    WriteLn('PERSONFILE',CheckForReplacement(arg(1)))
  2179.    if flags.MakeGuide then WriteLn('PERSONGuide',CheckGuideRepl(arg(1)))
  2180.    if DoGenText then WriteLn('GenealogyText',CheckForNAReplacement(arg(1)))
  2181.    end
  2182.  end
  2183.  return 0
  2184.  
  2185. GeneaOutputCr: PROCEDURE EXPOSE person. flags.
  2186.  WriteLn('GenealogyFile','<BR>')
  2187.  if flags.MakeGuide then WriteLn('GenealogyGuide','') 
  2188.  return 0
  2189.  
  2190. GeneaOutputCh: PROCEDURE EXPOSE person. AGdir DoGenText flags. PersonPrefix LastNameFl LastNameVal
  2191.  if arg(1) ~= "" then do
  2192.   if arg(2) = 0 then do
  2193.    WriteCh('GenealogyFile',arg(1))
  2194.    if flags.MakeGuide then WriteCh('GenealogyGuide',arg(1))
  2195.    end
  2196.   else do
  2197.    WriteCh('GenealogyFile',CheckForReplacement(arg(1)))
  2198.    if flags.MakeGuide then WriteCh('GenealogyGuide',CheckGuideRepl(arg(1)))
  2199.    end
  2200.  end
  2201.  return 0
  2202.  
  2203. GeneaOutputLn: PROCEDURE EXPOSE person. AGdir DoGenText flags. PersonPrefix LastNameFl LastNameVal
  2204.  if arg(1) ~= "" then do
  2205.   if arg(2) = 0 then do
  2206.    WriteLn('GenealogyFile',arg(1))
  2207.    WriteLn('GenealogyGuide',arg(1))
  2208.    end
  2209.   else do
  2210.    WriteLn('GenealogyFile',CheckForReplacement(arg(1)))
  2211.    WriteLn('GenealogyGuide',CheckGuideRepl(arg(1)))
  2212.    end
  2213.  end
  2214.  return 0
  2215.  
  2216. TagStrip: PROCEDURE
  2217.  PARSE ARG line
  2218.  line = strip(line,'b','<tt>')
  2219.  line = strip(line,'b','</tt>')
  2220.  line = strip(line,'b','<pre>')
  2221.  line = strip(line,'b','</pre>')
  2222.  line = strip(line,'b','<p>')
  2223.  line = strip(line,'b','</p>')
  2224.  return line
  2225.  
  2226. /***************************************************************
  2227. * Check for "<IRN>" and replace with Person Name (with anchor) *
  2228. ***************************************************************/
  2229.  
  2230. CheckForReplacement: PROCEDURE EXPOSE person. flags. PersonPrefix LastNameFl LastNameVal
  2231.  PARSE ARG line "<" last
  2232.  if last = "" then return line
  2233.  RIRN = GetRIRN(last".")
  2234.  if RIRN = 0 then return line"<"last
  2235.  last = CheckforReplacement(last)
  2236.  lastend = GetEnd(last".")
  2237.  GetPerComp(RIRN)
  2238.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.RIRN = "" ) then
  2239.   return line'Living...'lastend
  2240.  RIRNFILENAME = PersonPrefix || RIRN
  2241.  if flags.bold then return line'<A HREF="'RIRNFILENAME'.htm">'person.GETFULLNAME.RIRN'</A>'lastend
  2242.  if LastNameFl = -1 & person.GETLASTNAME.RIRN = LastNameVal then do
  2243.   if person.GETSEX.RIRN = "M" then
  2244.    RIRNFULLNAME = ''flags.htmlb''person.GETFIRSTNAME.RIRN''flags.htmlub''
  2245.   else RIRNFULLNAME = ''flags.htmli''person.GETFIRSTNAME.RIRN''flags.htmlui''
  2246.   end
  2247.  else do
  2248.   if person.GETSEX.RIRN = "M" then
  2249.    RIRNFULLNAME = ''flags.htmlb''person.GETFULLNAME.RIRN''flags.htmlub''
  2250.   else RIRNFULLNAME = ''flags.htmli''person.GETFULLNAME.RIRN''flags.htmlui''
  2251.   end
  2252.  return line'<A HREF="'RIRNFILENAME'.htm">'RIRNFULLNAME'</A>'lastend
  2253.  
  2254. /******************************************************************
  2255. * Check for "<IRN>" and replace with Person Name (without anchor) *
  2256. ******************************************************************/
  2257.  
  2258. CheckForNAReplacement: PROCEDURE EXPOSE person. flags. PersonPrefix LastNameFl LastNameVal
  2259.  PARSE ARG line "<" last
  2260.  if last = "" then return line
  2261. /* if last = "" then return line */
  2262.  RIRN = GetRIRN(last".")
  2263.  if RIRN = 0 then return line"<"last
  2264.  last = CheckForNAReplacement(last)
  2265.  lastend = GetEnd(last".")
  2266.  GetPerComp(RIRN)
  2267.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.RIRN = "" ) then
  2268.   return line'Living...'lastend
  2269.  if ~flags.bold then do
  2270.   if LastNameFl = -1 & person.GETLASTNAME.RIRN = LastNameVal then do
  2271.    if person.GETSEX.RIRN = "M" then
  2272.     RIRNFULLNAME = ''person.GETFIRSTNAME.RIRN''
  2273.    else
  2274.     RIRNFULLNAME = ''person.GETFIRSTNAME.RIRN''
  2275.    return line||RIRNFULLNAME lastend
  2276.    end
  2277.   else do
  2278.    if person.GETSEX.RIRN = "M" then
  2279.     RIRNFULLNAME = ''person.GETFULLNAME.RIRN''
  2280.    else
  2281.     RIRNFULLNAME = ''person.GETFULLNAME.RIRN''
  2282.    return line || RIRNFULLNAME lastend
  2283.    end
  2284.   end
  2285.  else do
  2286.   if LastNameFl = -1 & person.GETLASTNAME.RIRN = LastNameVal then
  2287.    RIRNFULLNAME = person.GETFIRSTNAME.RIRN
  2288.   else RIRNFULLNAME = person.GETFULLNAME.RIRN
  2289.   return line||RIRNFULLNAME lastend
  2290.   end
  2291.  
  2292. /****************************************************************
  2293. * Check for "<IRN>" and replace with Person Name (Guide anchor) *
  2294. ****************************************************************/
  2295.  
  2296. CheckGuideRepl: PROCEDURE EXPOSE AGdir person. flags. PersonPrefix LastNameFl LastNameVal
  2297.  PARSE ARG line "<" last
  2298.  if last = "" then return line
  2299.  RIRN = GetRIRN(last".")
  2300.  if RIRN = 0 then return line"<"last
  2301.  last = CheckGuideRepl(last)
  2302.  lastend = GetEnd(last".")
  2303.  GetPerComp(RIRN)
  2304.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.RIRN = "" ) then
  2305.   return line'Living...'lastend
  2306.  RIRNFILENAME = PersonPrefix || RIRN
  2307.  if LastNameFl = -1 & person.GETLASTNAME.RIRN = LastNameVal then 
  2308.   RIRNFULLNAME = person.GETFIRSTNAME.RIRN
  2309.  else RIRNFULLNAME = person.GETFULLNAME.RIRN
  2310.  if flags.bold then 
  2311.   return line'@{" 'RIRNFULLNAME' " LINK 'AGdir'/'RIRNFILENAME'.guide/Main}'lastend
  2312.  thegender = 'i'
  2313.  if person.GETSEX.RIRN = "M" then thegender = 'b'
  2314.  return line'@{" " LINK 'AGdir'/'RIRNFILENAME'.guide/Main}@{'thegender'}'RIRNFULLNAME'@{u'thegender'}'lastend
  2315.  
  2316. GetRIRN: PROCEDURE
  2317.  PARSE ARG numb ">" last
  2318.  if last = "" then return 0
  2319.  if IsNumeric(numb) then return numb
  2320.  return 0
  2321.  
  2322. GetEnd: PROCEDURE
  2323.  PARSE ARG line ">" last
  2324.  if last = "" then return substr(line,1,length(line)-1)
  2325.  return substr(last,1,length(last)-1)
  2326.  
  2327. GetLength: PROCEDURE
  2328.  PARSE UPPER ARG names
  2329.  nonletters = length(compress(names, xrange('A','Z')))
  2330.  return Length(names) - nonletters * 4 / 10
  2331.  
  2332.  
  2333. /* create a full name from first, last, and honorifics parts */
  2334.  
  2335. GetFullName: PROCEDURE EXPOSE person. thelastname
  2336.  PARSE ARG firstnames "," hon
  2337.  if hon = "" then do
  2338.   if length(firstnames) > 2 then
  2339.    if substr(firstnames,length(firstnames)-1,length(firstnames)) = "V." then
  2340.     firstnames = substr(firstnames,1,length(firstnames)-2)"v."
  2341.   return firstnames thelastname
  2342.   end
  2343.  return firstnames Space(thelastname)","hon
  2344.  
  2345. MGetFullName: PROCEDURE EXPOSE person. flags. thelastname thegender
  2346.  PARSE ARG firstnames "," hon
  2347.  if flags.bold then return firstnames Space(thelastname)
  2348.  gchar = "B"
  2349.  if thegender = "f" then gchar = "I"
  2350.  if hon = "" then do
  2351.   if length(firstnames) > 2 then
  2352.    if substr(firstnames,length(firstnames)-1,length(firstnames)) = "V." then
  2353.     firstnames = substr(firstnames,1,length(firstnames)-2)"v."
  2354.   return "<"gchar">"firstnames thelastname"</"gchar">"
  2355.   end
  2356.  return "<"gchar">"firstnames Space(thelastname)","hon"</"gchar">"
  2357.  
  2358. PGetFullName: PROCEDURE EXPOSE person. flags. thelastname thegender
  2359.  PARSE ARG firstnames "," hon
  2360.  if flags.bold then return firstnames Space(thelastname)
  2361.  schar = "1"
  2362.  uchar = "2"
  2363.  if thegender = "f" then do
  2364.   schar = "3"
  2365.   uchar = "3"
  2366.   end
  2367.  if hon = "" then do
  2368.   if length(firstnames) > 2 then
  2369.    if substr(firstnames,length(firstnames)-1,length(firstnames)) = "V." then
  2370.     firstnames = substr(firstnames,1,length(firstnames)-2)"v."
  2371.   return ""schar"m"firstnames thelastname""uchar"m"
  2372.   end
  2373.  return ""schar"m"firstnames Space(thelastname)","hon""uchar"m"
  2374.  
  2375. AgeTest: PROCEDURE EXPOSE flags.
  2376.  PARSE ARG DBFile, HTMFile
  2377.  if Exists(DBFile) then do
  2378.   if Exists(HTMFile) then do
  2379. Parse value StateF(DBFile) with type size blk bits DBday DBmin DBtick com
  2380. Parse value StateF(HTMFile) with type size blk bits HTMday HTMmin HTMtick com
  2381. /* Say DBFile DBday DBmin DBtick  HTMFile HTMday HTMmin HTMtick */
  2382.    if ( DBday > HTMday ) | ( DBday = HTMday & DBmin > HTMmin ) then do
  2383.     Delete(HTMFile)
  2384.     Say DBFile 'is newer; removing 'HTMFile
  2385.     return 1
  2386.     end
  2387.    else do
  2388.     if flags.verbose then Say '  ~ 'HTMFile'  ...OK... '
  2389.     return 0
  2390.     end
  2391.   return 1
  2392.   end
  2393.  return 1
  2394.  end
  2395.  
  2396. CheckPathName: PROCEDURE
  2397. PARSE ARG str
  2398. /* Check if path ends with a ":". If not, append a "/" */
  2399. lastchar = right(str,1)
  2400. if right(str,1) ~= ":" & right(str,1) ~= "/" then return str'/'
  2401. return str
  2402.  
  2403. AskExit: PROCEDURE
  2404.  SAY '                 '
  2405.  SAY '===> press RETURN to exit...'
  2406.  SAY ' '
  2407.  PULL target
  2408.  PauseExit()
  2409.  end
  2410.  
  2411. PauseExit: PROCEDURE
  2412.  SAY ' '
  2413.  SAY '    \                   /'
  2414.  SAY '     \                 / '
  2415.  SAY '                         '
  2416.  SAY '                         '
  2417.  SAY '       Scion2html.rexx   '
  2418.  SAY '                         '
  2419.  SAY '              ©          '
  2420.  SAY '                         '
  2421.  SAY '        Harold Ipolyi    '
  2422.  SAY '                         '
  2423.  SAY '                         '
  2424.  SAY '     /                 \ '
  2425.  SAY '    /                   \'
  2426.  SAY ' '
  2427.  EXIT
  2428.  end
  2429.  
  2430. CheckGfxCon: PROCEDURE
  2431. DoPictures = EXISTS("Sys:Tools/GfxCon")
  2432.  
  2433. if ~DoPictures then do
  2434.  SAY ' '
  2435.  say 'GfxCon not found in Sys:Tools - unable to include inline pictures in HTMLs'
  2436.  end
  2437. return DoPictures
  2438.  
  2439. Validtarget: PROCEDURE
  2440.  PARSE UPPER ARG str
  2441.  tval = substr(str,1,1)
  2442.  if verify(' BCDEFGIJKLMOPRSTUVWXYZ.,<>-=\|+_)(*&^%$@!~[]{}`',tval,m) > 1 then
  2443.   return 0
  2444.  return 1
  2445.  
  2446.  
  2447. GetPerComp: PROCEDURE EXPOSE person. flags.
  2448.  PARSE ARG irn
  2449.  if irn = '' then return ""
  2450.  
  2451.  if ~person.gotten.irn then do
  2452.   person.gotten.irn = 1
  2453.  
  2454. /* name */
  2455.   'GETFIRSTNAME' irn
  2456.   person.GETFIRSTNAME.irn = RESULT
  2457.   'GETLASTNAME' irn
  2458.   person.GETLASTNAME.irn = RESULT
  2459.   thelastname = GetLastName(person.GETLASTNAME.irn)
  2460. /* requires `thelastname' above */
  2461.   person.GETFULLNAME.irn = GetFullName(person.GETFIRSTNAME.irn)
  2462. /* gender */
  2463.   'GETSEX' irn
  2464.   person.GETSEX.irn = RESULT
  2465.   thegender = GETSEX.irn
  2466. /* special names; requires `thegender' above */
  2467.   person.MGETFULLNAME.irn = MGetFullName(person.GETFIRSTNAME.irn)
  2468.   person.PGETFULLNAME.irn = PGetFullName(person.GETFIRSTNAME.irn)
  2469. /* dates */
  2470.   'GETBIRTHDATE' irn
  2471.   person.GETBIRTHDATE.irn = RESULT
  2472.   'GETDEATHDATE' irn
  2473.   person.GETDEATHDATE.irn = RESULT
  2474. /* places */
  2475.   'GETBIRTHPLACE' irn
  2476.   person.GETBIRTHPLACE.irn = RESULT
  2477.   'GETDEATHPLACE' irn
  2478.   person.GETDEATHPLACE.irn = RESULT
  2479.   end
  2480.  return 0 
  2481.  
  2482. askliving: PROCEDURE
  2483.  answer = ""
  2484.  say ' '
  2485.  call writech(stdout,'          Exclude info about living persons? [y] ')
  2486.  PULL answer
  2487.  if Upper(substr(answer,1,1)) = 'N' then return 0
  2488.  if Upper(substr(answer,1,1)) = 'Q' then AskExit()
  2489.  return 2
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  /* Capitalize last name; also handle special cases! */
  2497.  /* End users may wish to customize this code */
  2498.  
  2499. GetLastName: PROCEDURE
  2500.  
  2501. /* to use last names as is in data base, uncomment the following 2 lines: */
  2502. /* PARSE ARG str */
  2503. /* return str    */
  2504.  
  2505.  PARSE upper ARG str
  2506.  if str = "BAUER-GAUSS" then return "Bauer-Gauss"
  2507.  if ( str = "DE IPOLYI" ) | ( str = "DEIPOLYI" ) then return "deIpolyi"
  2508.  if str = "MC GRADY" then return "McGrady"
  2509.  if str = "MCFEE" then return "McFee"
  2510.  if str = "KIS RED" then return "KisRed"
  2511.  if str = "ROTH-HACKENSCHMIDT" then return "Roth-Hackenschmidt"
  2512.  if str = "SCHüCH-GLICKHFELDEN" then return "Schüch-Glickhfelden"
  2513.  if str = "VONRUDERFRUD" then return "Von Ruderfrud"
  2514.  if str = "VONHARBEN" then return "Von Harben"
  2515.  else
  2516.   DO
  2517.   spart = translate(substr(str,2,length(str)),xrange('a','z'),xrange('A','Z'))
  2518.   end
  2519.  return substr(str,1,1)Space(spart)
  2520.  
  2521.